How to create auto increment field on form load in InfoPath in SharePoint 2013/Online
Check out Best Alternative to InfoPath -> Try Now
In this InfoPath tutorial, we will discuss how to show an auto increment field in InfoPath 2013 form in SharePoint 2013.
1. Open Infopath 2013 form using InfoPath designer 2013 and a text box control to the form.
2. Go to the textbox properties and add a default value(EX.1).
4. Go to the Infopath form and create a “Receive” data connection(Ex.Receieve Data) by following the SharePoint site and library name.
5. Select the ID field and the autoincrement field name while creating the data connection.
6. Now click on the Data tab->form load.
7. Add action and set the condition as if ID(form Receive Data)not equal to zero.
8. Then set rule as a query for data connection(Recieve Data)
Set field value of textbox=max(autoincrement field(from Receive Data connection))+1
See the attached screenshot for more information.
9. Publish the form and see the result, you will see InfoPath increment number field.
You may like following InfoPath 2013 SharePoint tutorials:
- How to publish InfoPath forms as a content type in SharePoint 2013/2016/Online
- InfoPath alternatives for designing SharePoint Forms
- Deploy Administration approved InfoPath forms in SharePoint 2013
- SharePoint 2013 InfoPath Submit option multiple click issue
- InfoPath 2013 People Picker browse button does not work on InfoPath form Nothing happens after the click
- Make attachment field mandatory in InfoPath Designer 2013 in SharePoint Online list
- InfoPath 2013 show hide section using Rules in SharePoint online
- Limit attachment size in InfoPath 2013 SharePoint online
- InfoPath 2013 multiple attachments
Hope this InfoPath tutorial will help to learn how to create auto increment field on form load in InfoPath in SharePoint 2013/Online.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)