@Left (Formula Language)

Searches a string from left to right and returns the leftmost characters of the string.

Syntax

@Left( stringToSearch ; numberOfChars ) @Left( stringToSearch ; subString )

Parameters

stringToSearch

Text or text list. The string where you want to find the leftmost characters.

numberOfChars

Number. The number of characters to return. If the number is 2, the first two characters of the string are returned; if the number is 5, the first five characters are returned, and so on. If the number is negative, the entire string is returned.

subString

Text. A substring of stringToSearch. @Left returns the characters to the left of subString. It finds subString by searching stringToSearch from left to right.

Return value

resultString

Text or text list. The leftmost characters in stringToSearch. The number of characters returned is determined by either numberOfChars or subString. @Left returns "" if subString is not found in stringToSearch.

Usage

If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

Examples

  1. This example returns Len.
    @Left("Lennard Wallace";3)
  2. This example returns Lennard Wal if the string in the Contact field is Lennard Wallace.
    @Left(Contact;"la")
  3. This example returns Tim if the string in the Author field is Timothy Altman.
    @Left(Author;3)
  4. This example returns Timothy if the string in the Author field is Timothy Altman.
    @Left(Author;" ")
  5. This example returns L and W in a list.
    @Left("Lennard" : "Wallace"; 1)