Salesforce

Right (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Right (Magic xpa 4.x)

Returns a specified number of characters from an Alpha string, starting with the rightmost character.

Syntax:

Right(string,length)

Parameters:

string: An Alpha string from which the characters will be taken.

length: The number of characters to be retrieved, starting from the rightmost character.

Returns:

Output string

Examples:

Right('abcdefg',3) returns 'efg.'

If the string is an Alpha variable, the function refers to the full length of the variable. If variable A is a 20-character alpha variable containing 'abcdefg', Right(A,3) returns ' ' (blanks, the last three positions of the variable).

To retrieve the characters from the actual alpha string contained in a variable, use Right(RTrim(A),3).

See also:

Left, MID, RTrim

The Online and Rich Client Samples projects (program ST09 and RST09)

Reference
Attachment 
Attachment