LEFT

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

Description

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

Syntax

LEFT(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 start 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 LEFT function to extract text from the start of a text field. 

Arguments

We will be using one Text field:

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

We will attempt to extract 3 characters from the start of the field.

Formula

LEFT(text, 3)

Results