Salesforce

Len (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Len (Magic xpa 3.x)

Returns the defined length of an Alpha string.

Syntax:

Len(string)

Parameters:

string: Input Alpha string.

Returns:

Length

Example:

Len ('abcdefg') returns 7.

Note:

If you are using an Alpha variable of size 20, then Len (A) will return 20 regardless of what is in the string. It is advisable to use this together with the Trim function to remove trailing blanks.

To retrieve the actual length of an Alpha column, use Len(RTrim(field)). If A is a 20- character Alpha column containing the string 'John ___ ', where ____ implies blanks, Len (RTrim(A)) returns 4.

See also:

RTrim, LTrim

The Online and Rich Client Samples projects (program ST10 and RST10)

Reference
Attachment 
Attachment