Create or Edit a Text Function
Upland Analytics allows you to define your own powerful Text Functions to meet your specific reporting requirements.
Text functions can be used in several ways: They can return the number of characters in text strings, remove extra characters, return exact position within a string, and even combine text from other cells.
A number of options are available to you when choosing the Text Function Type. This topic details each of the available Function options with examples.
Substring
Each character in a string is considered to have a numeric position; the position of the first character is 1, the position of the second character is 2, and so on. The Substring function returns the strings between Start index and End index of a string. For example, the substring of Audrey where the Start index=1 and End index=3 is Aud.
Note: When Substring Function is chosen, Start index, End indexand Apply condition over options are enabled.
Create a Substring Text Function
- Click Create New on the Custom Fields tab.
- Click the Type drop-down arrow and select Text Function.
- Click the Function drop-down arrow and select Substring.
- Click the Apply function over drop-down arrow and select an option.
- In the Start Index box, do the following:
- Type the position of the first character.
- Select the available position from the list.
- Note that your selection is added to the Start Index box.
- In the End Index box, do the following:
- Type the position of the first character.
- Select the available position from the list.
- Note that your selection is added to the End Index box.
- In the Custom Field Name box, type the name for the new custom field.
- Click one of the following:
- Cancel to return the previous page.
- Save & New to save the custom field and create a new one.
- Save & Continue to save the custom field and continue working on it. This is useful when working on a large formula or function.
- Save & Close to save the custom field and then close the Custom Field Builder. You will be redirected to the Report Editor screen where the newly created custom field(s) can be used in a report or graph/chart.
Length
The Length function returns the length of the given string as an integer value. It includes all characters such as spaces, punctuation, numbers as well as letters where applicable. For example, the Length of Apollo Liftoff is 14.
Note: When Count Condition is chosen, Apply condition over option is enabled.
Create a Length Text Function
- Click Create New on the Custom Fields tab.
- Click the Type drop-down arrow and select Text Function.
- Click the Function drop-down arrow and select Length.
- Click the Apply function over drop-down arrow and select the measure over which you want to apply the Function.
- In the Custom Field Name box, type the name for the new custom field.
- Click one of the following:
- Cancel to return the previous page.
- Save & New to save the custom field and create a new one.
- Save & Continue to save the custom field and continue working on it. This is useful when working on a large formula or function.
- Save & Close to save the custom field and then close the Custom Field Builder. You will be redirected to the Report Editor screen where the newly created custom field(s) can be used in a report or graph/chart.
Position
The Position function returns the position of the specified string within the Apply condition over field. For example, the position of the string "Apollo" within "Apollo Liftoff" is 1.
Note: When Position function is chosen, Apply function over and Text to find options are enabled.
Create a Position Text Function
- Click Create New on the Custom Fields tab.
- Click the Type drop-down arrow and select Text Function.
- Click the Function drop-down arrow and select Position.
- Click the Apply function over drop-down arrow and select the measure over which you want to apply the Position function.
- In the Custom Field Name box, type the name for the new custom field.
- Click one of the following:
- Cancel to return the previous page.
- Save & New to save the custom field and create a new one.
- Save & Continue to save the custom field and continue working on it. This is useful when working on a large formula or function.
- Save & Close to save the custom field and then close the Custom Field Builder. You will be redirected to the Report Editor screen where the newly created custom field(s) can be used in a report or graph/chart.
Replace
The Replace function replaces one text string with another.
Note: When Replace Function is chosen, the Apply function over, Search for and Replace with boxes are enabled.
Create a Replace Text
- Click Create New from the Custom Fields tab.
- In the Custom Field Name box, type the name for the new custom field.
- Click the Type drop-down arrow and select Text Function.
- Click the Function drop-down arrow and select Replace.
- Click the Apply function over drop-down arrow and select from the available options.
- In the Search for box, type the text string you want to search for.
- In the Replace with box, type the text string you want to replace the Search for text string with.
- Click one of the following:
- Cancel to return the previous page.
- Save & New to save the custom field and create a new one.
- Save & Continue to save the custom field and continue working on it. This is useful when working on a large formula or function.
- Save & Close to save the custom field and then close the Custom Field Builder. You will be redirected to the Report Editor screen where the newly created custom field(s) can be used in a report or graph/chart.
Concatenate
The Concatenate Text function allows you to join text from separate cells into the same cell. For example, Concatenate (First Name, Last Name). Using this function will result in the joining of a First Name and Last Name as shown below.
Create a Concatenate Text Function
- Click Create New on the Custom Fields tab.
- Click the Type drop-down arrow and select Text Function.
- Click the Function drop-down arrow and select Concatenate.
- In the Concatenate fields box, do the following:
- Type the name of the field that you want to concatenate.
- Select the field from the list. The selected field is added to the Concatenate fields box. (Repeat steps 4a and 4b to add more fields).
- To add a commma:
- Type , in the Concatenate fields box. The comma displays in the list.
- Click the comma in the list. The comma now displays in the Concatenate fields box.
- In the Custom Field Name box, type the name for the new custom field.
- Click one of the following:
- Cancel to return the previous page.
- Save & New to save the custom field and create a new one.
- Save & Continue to save the custom field and continue working on it. This is useful when working on a large formula or function.
- Save & Close to save the custom field and then close the Custom Field Builder. You will be redirected to the Report Editor screen where the newly created custom field(s) can be used in a report or graph/chart.