Display the contents of multiple fields in one control
When designing a form, you can create a formula that combines and displays the contents of two or more fields into a single control by using a text box, rich text box, or expression box.
Note You should use an expression box only if you do not want to use the value in another calculation or save it as part of your form, because expression boxes only display data and do not store it.
- In design mode, double-click the control where you want to display the combined values.
- On the Data tab in the Control Properties dialog box, click Insert Formula .
- In the Insert Formula dialog box, click Insert Function.
- In the Categories list in the Insert Function dialog box, click Text.
- In the Functions list, click concat, and then click OK.
- In the Formula box in the Insert Formula dialog box, double-click the text in parentheses.
- In the Data source list in the Select a Field or Group dialog box, click the field whose value you want to combine, and then click OK.
- Repeat steps 6 and 7 for every field whose value you want to combine.
- In the Formula box, type the text you want to display between the fields when they are combined. For example:
- To display a space between two fields, type ," ", (for example, concat(field1, " ", field2)).
- To display a comma between two fields, type ,",", (for example, concat(field1, ",", field2)).
- To display two fields as run together, make sure the fields are separated by a comma (for example, concat(field1, field2)).
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more