Archive for July, 2009

How to check if your InfoPath form is “dirty”?

Posted in InfoPath, XPath, browser forms, browser-enabled, templates with tags , , , , , , , , on July 6, 2009 by alecpojidaev

Bookmark that post

1) Create field called InitialState
2) At open event assign InitialState field to the following Xpath expression:

.. Yes, it’s two dots :)

3) At the submit rule compare InitialState field with the following expression assuming it’s a rule condition at a button:
starts-with(., my:InitialState)
Make sure the InitialState field is a very last node in the myFields group fields list.
I also believe some people might find interesting the way I used conditional expression to parameterize output message.

Here is form to test

Form with more advanced XPath (InitialState can be at any position)