How to create new form name in InfoPath?

How to create new form name in InfoPath?

One method is in which you create a data connection back to the form library itself, pull in all the items, and calculate the MAX ID + 1, to create your new form name. That’s an okay method, except that I’ve seen it bomb out once your library view gets to over 1,000 items.

How do I create a data connection in InfoPath?

In InfoPath, create a new (browser-compatible) InfoPath form template. Add a Text Box control to the form template and name it autonumber. On the Tools menu, click Data Connections. On the Data Connections dialog box, click Add, and create a Receive data connection to the SharePoint library that you created in step 1.

How to create a form library in SharePoint?

In SharePoint, create a form library to submit your forms to. In InfoPath, create a new (browser-compatible) InfoPath form template. Add a Text Box control to the form template and name it autonumber. On the Tools menu, click Data Connections.

How to change AutoID to function in InfoPath?

Set the default value of AutoID to be the function Now (). Uncheck the box to refresh the value. When you go through the publishing wizard in InfoPath, promote the AutoID field up as a column, and check the box to “allow users to edit data in this field…”

When to use AutoID field as form filename?

As soon as the XML file is first created, the workflow will run, and will change the filename and the AutoID field to the ID of the item. Then, next time someone opens it up and submits it again (if you want them to be able to-see the checkbox at step 3), it will submit as that same AutoID number.

How can I add a hidden field to a form?

The easiest way to create a hidden field is to drag-and-drop a text box control onto the form template’s view. Rename the text box to ‘filename’ and click OK. Then select the filename text box and hit delete to remove the field from the view. Go to Tools, Data Connections and click Add.

Can a form filename be the ID of an XML file?

It is a common requirement of InfoPath projects to make a form in a form library, where the name of the XML file is the same as the ID of the item itself. There are several methods I’ve seen out there, and I’m definitely not the first person to blog about this.