RIGHT

The following section describes the syntax and usage of the RIGHT function in ActivityInfo.

Description

The RIGHT function is used to return a specified number of characters from the end of a string (or text value).

Syntax

RIGHT(string, numChars)

Argument Required Description
string Yes The text value. 
numChars Yes The number of characters you wish to return from the text value.

This must be a numeric value.

Result

  • The sub-string extracted from the end of the text value, which has a length of numChars.
  • NA if the string is empty, not a text value, or if the number of characters requested exceeds the length of the original text.

Example

We will be using the RIGHT function to extract text from the end of a text field. 

Arguments

We will be using one Text field:

  • "Text Field" (with code "text")

We will attempt to extract 4 characters from the end of the field.

Formula

RIGHT(text, 4)

Results