Concatenate Fields in an InfoPath 2013 SharePoint Form
Question details
Combine SharePoint form fields or user information into a single value in InfoPath 2013.

- Product
- Microsoft InfoPath 2013 and SharePoint
- Device & OS
- not provided
- Scenario
- Automatically create a title or identifier from multiple form fields or the current user name.
- Observed behavior
- The desired result is a single form field populated with the combined value.
Open the SharePoint form template in InfoPath Designer 2013 and identify the source fields and destination field. Check whether the SharePoint item ID is available when the rule will run.
Use an InfoPath rule to concatenate form fields
Set a destination field to a combined value when a button is clicked or another rule condition is met.
In InfoPath Designer, open the form template and select the button or control that should trigger the update. Open the Rules pane and add an Action rule.
In the rule, add a Set a field's value action and select the destination field, such as Title or NAME.
Next to Value, click the formula button (fx). Use Insert Function to add concat, then use Insert Field or Group to select the source fields. Add literal text such as spaces or hyphens between the fields as needed.
Click Preview, enter test values, and trigger the rule. Verify the combined value and field types, then publish the form to SharePoint.

Combine a domain prefix with the current user name
Use this variation when the destination value should include a fixed network domain and the current user name.
Work with Office documents using WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. It can help you move everyday documents and spreadsheets between suites, but it does not replace InfoPath rules or publish SharePoint forms.

Frequently Asked Questions
How do I add a space between a first and last name?
In the Set a field's value formula, use concat with the first-name field, the literal text " ", and the last-name field. Select the fields through Insert Field or Group.
Can I use a SharePoint item ID in the combined value?
Yes, if the ID field is available to the form when the rule runs. A SharePoint-generated ID may not be available until the item has been saved for the first time.
Does userName() return the user's display name?
No. userName() returns the current user's account name. Preview the form and check the result in your environment before adding a domain prefix.
Where do I choose the field that receives the combined value?
In the Rules pane, add a Set a field's value action and select the destination field, such as Title, in the action's field selector.




