Declare Hidden Variable in InfoPath 2013/2010
Check out Best Alternative to InfoPath -> Try Now
This InfoPath SharePoint tutorial explains, how we can declare a hidden variable in InfoPath 2013/2010 form. We can use hidden variables to keep track of any value or any flag according to the requirement in SharePoint.
Declare Hidden Variable in InfoPath
There are two approaches we can declare a hidden variable in InfoPath.
Put a textbox control from the controls section from the Home tab in the Ribbon. Once you put a textbox, the textbox will appear in the form and a field will be added into the Fields list.
Then delete the textbox from the form, remember if you will delete the field from the form it will not delete the field from the field list. So you can right-click the field and the Field Properties and then you can set values in Field and Group Properties dialog box. This field will work as your hidden variable.
From the Fields, click on Add Field as shown in the fig below:
Then in the Add Field or Group dialog box give the display name for the field, Name and you can also choose the Data Type.
Also if you want to give some default value then you can set.
Then click on OK. This will also work as a hidden variable. Appreciate your comment if something is wrong or you want to suggest something.
You may like following InfoPath SharePoint tutorials:
- InfoPath 2013 show hide section using Rules in SharePoint online
- Limit attachment size in InfoPath 2013 SharePoint online
- Print multiple InfoPath form views in SharePoint 2013/2016/Online
- InfoPath 2103 string-before and string-after function in SharePoint 2013
- InfoPath Add action rule to people picker in SharePoint 2013
- Add More than 5 conditions in InfoPath 2013 Rule in SharePoint
- Add Infopath form to a page in SharePoint using InfoPath Form Web Part
- SharePoint 2013 Calculate business day from InfoPath date picker or Get Day from a selected date in Date picker in InfoPath 2013
I hope this will be helpful to declare Hidden Variable in InfoPath 2013/2010 in SharePoint 2013/2010.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.