I am working with an InfoPath form where I set a value of a field to "1" on form submit. But to my surprise the field does not retain the value when the form is opened after submit. I am unable to understand why InfoPath is behaving so weirdly. I have worked with InfoPath previously but never came across this issue.
Does this form submit to a library or is it a list form? If it submits to a library, after submitting, download the XML file and take a look in a text editor. Does the field still have the value? Usually when I hear of an issue like this either:
- The field is being set after the submit data connection is executed, so that the data doesn't get saved
- A form load rule is changing the value on open
I just solved this problem in an Infopath 2013 form. I was setting a textbox field's text based on a rule from a different field. I could see the textbox get updated with the correct text after the rule was triggered, but the text was not getting saved to the list.
To fix this, you need to edit the textbox's properties, click on the "Browser forms" tab, and change the "Postback settings" to "Always."