Text Formula
Text Formula fields are basic field types that can combine multiple fields into a single output using a text formula.
Sample Text Formula Field:
For instance, if you have a Property Management application with properties and units, you may wish to combine the Property Name field with the Unit Name field to create a new field with the single output of the full Property and Unit name (example: combine "Property A" field with "Unit D5" field to form a new field with the single output of "Property A Unit D5").
TIP: Text formulas are similar to "CONCAT" in Excel.
Let's explore how to create a text formula field such as the example above.
Creating a text formula field
To add a new text formula field to your data table, click on the Equation field type category on the Add Field menu and select the Text Formula field type from the drop-down list.
When adding a new Text Formula field, there are several settings you can customize such as those highlighted in the image below.
-
Name- where you can title your Text Formula field. For instance, "Property and Unit Name" or "Trip Route".
-
Description- where you can optionally provide a brief description of this field for your own reference.
-
Formula- this is where you can define the text formula for this field. The Formula section is divided into three parts:
Let's discuss how to use the Formula section to create text formulas for your text formula fields.
For instance, in the example listed above we had a Property Name field, a Unit Name field, and we combined these two fields to create a new text formula field titled Property and Unit Name.
The GIF below demonstrates the text formula that was used to create this Property and Unit Name text formula field. As you can see in the GIF, the Property Name field is added to the formula, then a custom text of a space character is added, and then the Unit Name field is added to form a single output of "'Property Name' 'space' 'Unit Name'".
Let's walk through another instance of how to create a Text Formula field.
Say you have an Origin field and a Destination field and would like to combine these two fields to create a new field with a single output of your Route (origin to destination). You can accomplish this with a Text Formula field. To create your new Route field, you can create a new Text Formula field, title it "Route", and configure the text formula to combine your Origin and Destination fields into a single output.
As illustrated in the GIF below, you can create your Text Formula field by first clicking on the +Add Field button to add the Origin field. You can then enter the custom text of "'space character' 'to' 'space character'" and clicking on the +Add button to add this custom text. Lastly, you can click on the +Add Field button once again to add the Destination field for a final output of "Origin to Destination". You can then click Save to save your Route Text Formula field.
To test this Text Formula field in action, we can create a simple form in the Page Builder using the Origin and Destination fields.
When we click Save, we can see our Text Formula field in action within a table component on the live app.