& Operator: Concatenating Strings
You can concatenate multiple strings by using the & operator.
When concatenating strings, you must use half-width '&' operator. You cannot use '+' operator for this purpose.
Fields That Can Be Concatenated By Using the & Operator
When using the & operator to concatenate strings, you can specify following field types.
- Radio Button
- Date and time1
- Record created by
- Record updated by
- Record created datetime1
- Record updated datetime1
1: Use the DATE_FORMAT function to specify a formula.
2: If the Key Field is a Link field or a Lookup field (when the Key Field is a Link field), that field cannot be referenced by a formula.
This section describes the way to concatenate the Surname and the Given Name fields, by using an example of a company directory app.
Image of the completed app:
Open the app settings page.
Opening App Settings Page
In the screen to set forms, select the Text field in the parts list, and place two Text fields in the form
For the first field, specify "Surname" as the field name and the field code. For the second field, specify "Given Name" as the field name and "Given_Name" as the field code.
Place the Text field to be used to display the result, and change the field name and the field code to "Name".
Open the screen to set the "Name" field, select Calculate automatically, and then enter "Surname&" "&Given_Name".
You must use half-width '&' to concatenate strings. When adding a character or a space, use half-width double quotation marks (" ").
Click Save on the field settings screen.
Click Save Form on the upper left side of the screen, and then click Update App on the upper right side of the screen.
Now, you can concatenate strings.
Enter values in the Surname field and the Given Name field, to check that the result is displayed in the Name field.
TIPS: Empty Fields
Empty fields are concatenated as null strings.
For example, if you set a formula "State/Province&City&Block_number&Building&" "&Floor" in the Address field, even when the Floor is empty, other strings are concatenated.