Salesforce

StrToken (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

StrToken (Magic xpa 2.x)

Returns a token from a delimited string.

Syntax:

StrToken(Source String,Token Index,Delimiters String)

Parameters:

Source String delimited Alpha string with tokens.

Token Index requested token index (numeric).

Delimiters String Alpha string containing the delimiter string.

Returns:

Alpha Contains the requested token or empty string when not found.

Example:

StrToken(BA,2,',')

BA abcd,cdef,ghik,lmnp returns cdef

Note:

  • The Delimiters String can have more than one character for a delimiter.

  • When the index is 1 and the delimiter is empty, or not found, the full source string will return.

  • An empty string is returned when a delimiter is not found (empty delimiter, out of range index, or not exist delimiter), and the index is more than 1.

  • Every delimiter will be counted for the index calculation (no repetition).

  • A space cannot be a delimiter.

See also:

StrTokenCnt, StrTokenIdx

The Online and Rich Client Samples projects (program ST05 and RST05)

Reference
Attachment 
Attachment