How and why to give custom names to InfoPath forms

 

Three scenarios for using custom form names

1. Your Formotus form submits by email and you want the form name (and subject line) to be meaningful.

2. Your form submits to SharePoint and you want each submitted form name to be unique.

3. You work with multiple drafts of your form on a mobile device and you want the saved draft names to be meaningful.

Customizing for email submit

In InfoPath 2010 start at:

Data Tab | Data Connections | Modify

Select your email submit data connection. In the Data Connection Wizard there is an fx button next to the Subject line that you can use to define the email subject using fields and formulas. After you click Next there is a similar fx button next to the Attachment Name where you can define the filename using the same or a different formula.

A simple approach is to define the form name (and subject line) using a meaningful identifying field from your form -- customer name, work order number, etc. If you want the user to name each form before submitting it, simply create a required textbox field called FormName and insert that as the Attachment Name.

Better yet, you can use the concat() function to combine words, fields and functions for more sophisticated form names. For example this is the formula we use for the subject line of a contact form we use:

     concat("Question about ", QuestionAbout, " from ", FirstName, " ", LastName)

Which gives us a subject line like this:

    "Question about pricing and licensing from John Smith"

Customizing for SharePoint submit 

In InfoPath 2010 start at:

Data Tab | Data Connections | Modify

Select your SharePoint submit data connection. In the Data Connection Wizard there is an fx function button next to the filename field where you can define the filename using fields and formulas.

A common use for custom naming in forms that submit to SharePoint is to assure that each form submission has a unique name, thereby avoiding an overwrite. Using the timestamp function now() as the form name is a good way to accomplish this. Of course you can also include other useful information in the form name if you want to using the concat() function. For example:

concat("Customer ", now()) 

Customizing for drafts management

The Formotus service lets you work with multiple drafts of a form offline, so it can be helpful to give those drafts meaningful names using info from inside the form. A form named using either of the data connections, email or SharePoint, will also apply to the name of a saved draft.

Have more questions? Submit a request

0 Comments

Article is closed for comments.