Skip to main content
All CollectionsHelp ArticlesApricot Results Reporting (ARR)ARR Functions and Formulas
Apricot Results | Using the "Left" and "Right" functions to trim text strings
Apricot Results | Using the "Left" and "Right" functions to trim text strings
Updated over a year ago

When creating a report, you may have strings of text you need to cut down. This can be used for things such as turning a name into an initial or showing only the last four digits of a Social Security Number.

This can be done using the "Left" or "Right" functions.

These functions show only a certain number of characters in a string; the "Left" function showing a certain amount of characters starting from the left, and the "Right" function showing a certain amount starting from the right.

The formulas are set up as follows:

Left:

=Left([String of text object];number of characters to show)

For example, if you wanted to get the first Initial in someone's Last Name, you would do the formula =Left([Last Name];1)

Right:

=right([String of text object];number of characters to show)

For example, if you wanted the last 4 digits of a Social Security Number, you would need to first convert the number to a text string*, then do the formula =Right([SSN Text Variable];4)

*Click here to be taken to the article on turning a date or a number into a string of text

Did this answer your question?