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.
-
Are you sure that the field is saved with the rest of the data? SharePoint list or custom connection?– ChristofferJul 16, 2015 at 7:12
-
What type of field is it?– ChristofferJul 16, 2015 at 7:13
-
It is text field with a default value as 0.– Mancy DesaeeJul 16, 2015 at 7:17
-
And all the other fields get's saved correctly?– ChristofferJul 16, 2015 at 7:56
-
Yes,they are saved correctly.– Mancy DesaeeJul 16, 2015 at 9:07
2 Answers
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."