Text

From AgileApps Support Wiki

Text / alphanumeric Formula Functions:

CONCAT

CONTAINS

ENDSWITH

FIND

LEN

LOWER

REPLACE

STARTSWITH

SUBSTRING

TEXT

TRIM

UPPER



CONCAT

The CONCAT function joins two strings into a single string.

Syntax
CONCAT(string1, string2)
Return
String
Examples

Combine two text strings:

CONCAT('Mary','Jo') = 'MaryJo'

Convert a number to an integer:

CONCAT (numberOfItems, '')

    where: 
          numberOfItems is a numeric field
          '' is two single quote (') characters

CONTAINS

The CONTAINS function determines whether a given text string contains another text string. If the text string contains the search string, this function returns TRUE. If the text string does not contain the search string, this function returns FALSE.

Syntax
CONTAINS('string', 'searchString')

Notepad.png

Note:
The searchString is case-sensitive. For a case-insensitive search,
use the LOWER function on both the search string and the string being searched.

Return
TRUE or FALSE
Examples
CONTAINS('streetlamp', 'lamp') = TRUE
CONTAINS('streetlamp', 'streets') = FALSE

ENDSWITH

The ENDSWITH function determines whether a target string ends with a specified search string. This function returns TRUE if the target string ends with the search string. If the target string does not end with the search string, this function returns FALSE.

Syntax
ENDSWITH('string', 'searchString')

Notepad.png

Note:
The searchString is case-sensitive. For a case-insensitive search,
use the LOWER function on both the search string and the string being searched.

Return
TRUE or FALSE
Examples
ENDSWITH('john@stop.com', '.com') = TRUE
ENDSWITH('john@stop.net, '.com') = FALSE

FIND

The FIND function returns the starting character number of a search string within a specified target string. Optionally, a character number can be specified, which defines the character from which to start. If the character number is not specified, then the search starts from the first character of the string.

Syntax
FIND('string', 'searchString', start)

Notepad.png

Note:
The searchString is case-sensitive. For a case-insensitive search,
use the LOWER function on both the search string and the string being searched.

Return
Number
Example
FIND('street', '123 Maple Street') = 11

LEN

The LEN function returns the length (in number of characters) of a String.

Syntax
LEN('string')
Return
Number (whole number or integer)
Example
LEN('firefly') = 7

LOWER

The LOWER function converts all characters in a string to lower case.

Syntax
LOWER(string)
Return
Text string
Example
LOWER('Sales CYCLE') = 'sales cycle'

REPLACE

The REPLACE function searches for a string within a target string. If the search string is found, the replacement string is substituted for the search string.

Syntax
REPLACE('string', 'searchString', 'replacementString',)

Notepad.png

Note:
The searchString is case-sensitive. For a case-insensitive search,
use the LOWER function on both the search string and the string being searched.

Return
Text string
Example
REPLACE('quick', 'ic', 'ar') = 'quark'

STARTSWITH

The STARTSWITH function determines whether a target string starts with (begins with) a search string. This function returns TRUE if the target string starts with the search string. If the target string does not start with (begin with ) the search string, this function returns FALSE.

Syntax
STARTSSWITH('string', 'searchString')

Notepad.png

Note:
The searchString is case-sensitive. For a case-insensitive search,
use the LOWER function on both the search string and the string being searched.

Return
TRUE or FALSE
Examples
STARTSWITH('admin@stop.com', 'admin') = TRUE
STARTSWITH('john@stop.com, 'admin') = FALSE

SUBSTRING

The SUBSTRING function returns the characters in a string that are between the specified start and end character numbers.

Syntax
SUBSTRING(string, start, end)
start should be greater than zero (0)
Return
Text string
Example
SUBSTRING('123 Maple Avenue', 5, 9) = 'Maple'

TEXT

The TEXT function converts a number, date, or Boolean to a text string.

Syntax
TEXT(number)
Return
Text string
Example
TEXT(57) = '57'

TRIM

The TRIM function removes spaces from the beginning and/or end of a string.

Syntax
TRIM('string')
Return
Text string
Example
TRIM(' krypton ') = 'krypton'

UPPER

The UPPER function converts all characters in a string to upper case.

Syntax
UPPER(string)
Return
Text string
Example
UPPER('Business case') = 'BUSINESS CASE'