Dirty property of XmlForm in Infopath 2007

P

Paul Mason

I spent some time today trying to understand why this.Dirty wouldn't
compile in an Infopath 2007 form I was putting together (indeed,
Intellisense wouldn't bring the property up, which was a bit of a
clue, but I'm stubborn!) Removing browser compatibility restored Dirty
to Intellisense (unless I'm missing something, the fact this property
is not available in Forms Services isn't very well documented) - but
left me without a Dirty property for my browser based form.

Does anyone know of an easy way to determine if the underlying XML has
changed in a browser form?

Thanks!
 
G

Greg Collins

It is unfortunate that the Dirty property is not available. However, you can
use a change event to track this yourself. Change events bubble up the DOM,
so you can place one higher up (root node if you want) and write some code
to track whether changes occured. You'll also need to handle undo cases
yourself if you care.
 
P

Paul Mason

It is unfortunate that the Dirty property is not available. However, you can
use a change event to track this yourself. Change events bubble up the DOM,
so you can place one higher up (root node if you want) and write some code
to track whether changes occured. You'll also need to handle undo cases
yourself if you care.

--
Greg Collins
Microsoft MVP
Visit Braintrove athttp://www.braintrove.com
Visit InfoPathDev athttp://www.infopathdev.com

Thanks for your response Greg - I'd guessed that I'd probably have to
do something along the lines you suggest, but it's always nice to have
it confirmed that the approach is sound.

Thanks again,

Paul.
 
G

Greg Collins

Without the Dirty property being available, there's not much choice other
than to use a change event.
 
Top