You are here: Features > Cell Functions > Text Functions > TOKEN function

TOKEN Function

The Token function returns specific elements of a token separated list contained in a string. The string to be parsed is represented by STR, the element number to extract is 1 based and represented by NUM and the separator to use is represented by SEP. And optional parameter FULLSTR specifies whether the calculation will return nothing if a nonexistent NUM is specified or if the function will return the string passed in.

Combined with the CVDATA function, this can be used to extract popup cell information saved to the CaseView Database.

Syntax

TOKEN(STR,NUM,SEP,<FULLSTR>)

Example 1

A cell C2 containing "A|B|C" used to call the TOKEN() function with different parameters would give the following results:

TOKEN(C2, 1, "|")

= A 

TOKEN(C2, 2, "|")

= B 

TOKEN(C2, 3, "|")

= C 

TOKEN(C2, 4, "|")

=  

TOKEN(C2, 4, "|", 0)

=  

TOKEN(C2, 4, "|", 1)

= A|B|C 

Example 2

When using the Token function with CVDATA() to retrieve CaseView Database records, the syntax is as follows:

TOKEN(CVDATA("ALPHACELL"),2, "|")

Where "ALPHACELL" is the identifier of the data record in the CaseView Database.

Related Topics