Pedantic observation from a NEWBIE :-)

D

Darren Neimke

I'm just starting to develop InfoPath forms (for fun or profit) and, after
browsing through SDK documentation thought that I'd dive in and see how some
of the Sample Forms are implemented to get ideas about how to build "best
practices" forms.

So, I opened up the Detailed TimeCard form and - being a true programmer :)
- opened up the js code file in WSE.

Looking at the OnAfterChange handlers you can see that, changes cause calls
through to updateTotals(). There's some code in there which causes the
OnAfterChange handlers to exit if (XDocument.IsSigned) or if
(oEvent.IsUndoRedo).

Shouldn't they also exit if (oEvent.Operation == "Delete"). That's what
you'd normally do right?
 
A

Andrew Watt [MVP - InfoPath]

I'm just starting to develop InfoPath forms (for fun or profit) and, after
browsing through SDK documentation thought that I'd dive in and see how some
of the Sample Forms are implemented to get ideas about how to build "best
practices" forms.

So, I opened up the Detailed TimeCard form and - being a true programmer :)
- opened up the js code file in WSE.

Looking at the OnAfterChange handlers you can see that, changes cause calls
through to updateTotals(). There's some code in there which causes the
OnAfterChange handlers to exit if (XDocument.IsSigned) or if
(oEvent.IsUndoRedo).

Shouldn't they also exit if (oEvent.Operation == "Delete"). That's what
you'd normally do right?

Hi Darren,

I haven't gone to the sample form templates to check the exact
scenario, but if the form control had held a value and that was later
deleted wouldn't you want to reflect the effect of the deletion in the
total?

Andrew Watt
MVP - InfoPath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top