Recently we faced one issue while simply assigning a value to a textbox using a rule in SharePoint 2013 InfoPath form. I have an InfoPath form which has a textbox and a Submit button. In the Submit button, I was trying to set a static value to the textbox. But when I published the form and check in the browser I need to click two times in the Submit button to Submit the form or set the value. The rule usually does not trigger on the first time I clicked on the Submit button. It triggers in the second click.
As you can see in this InfoPath form I have only a textbox and a button. In the button, I have written a rule to set the textbox value to 1 on the button click.
Now when I publish the form and click on the Button, for the first time it works fine. It sets the value to 1 at one click only. But next time if I change the value or do something else also, I need to click 2 times then only the rule triggers.
The below solution works for me, If you are facing similar kind of issues, you can try the solution also.
What I did is I set the Postback settings to “Never” for the textbox. To do this, go to the textbox properties. Then go to the Browser forms tab and then select “Never” option in the Postback settings. See the fig below:
Read some SharePoint InfoPath tutorials:
- Make attachment field mandatory in InfoPath Designer 2013 in SharePoint Online list
- InfoPath 2013 show hide section using Rules in SharePoint online
- How to publish an InfoPath form to an email in SharePoint 2013?
- How to publish InfoPath forms as a content type in SharePoint 2013?
- Steps to Publish InfoPath form to SharePoint Online Office 365
After this, it worked fine. Hopefully, it will help you.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)