Label Functions

From Commander4j Wiki
Revision as of 14:13, 7 March 2014 by Dgarratt (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

SUBSTRING

This function allows you to extract a smaller string from within a larger one by specifying the start position and length of the string required.

Syntax <SUBSTRING(string,start,len)>
Example <SUBSTRING(<*SSCC*>,1,3)>

Input 350001611234567890 Output 350

LEFT

This function allows you to extract a specified number of characters from the left side of a string

Syntax <LEFT(string,len)>
Example <LEFT(<*SSCC*>,5)>

Input 350001611234567890 Output 35000

This function allows you to extract a specified number of characters from the right side of a string

Syntax < RIGHT(string,len)>
Example < RIGHT(<*SSCC*>,6)>

Input 350001611234567890 Output 567890

PADLEFT

This function allows you to pad out the size of string using a nominated character to the left of the original string

Syntax < PADLEFT(string,len,char)>
Example < PADLEFT(<* PROD_QUANTITY*>,4,0)>

Input 25 Output 0025

PADRIGHT

This function allows you to pad out the size of string using a nominated character to the left of the original string

Syntax < PADRIGHT(string,len),char>
Example < PADRIGHT(<*PROD_QUANTITY*>,4,)>

Input 25 Output 2500

UPPERCASE


Syntax < UPPERCASE(string)>
Example < UPPERCASE(<*DESCRIPTION*>)>

LOWERCASE


Syntax < LOWERCASE(string)>
Example < LOWERCASE(<* DESCRIPTION*>)>

TRIM


Syntax < TRIM(string)>
Example < TRIM(<* DESCRIPTION*>)>

LTRIM


Syntax < LTRIM(string)>
Example < LTRIM(<* DESCRIPTION*>)>

RTRIM


Syntax < RTRIM(string)>
Example < RTRIM(<* DESCRIPTION*>)>

TIMESTAMP


Syntax < TIMESTAMP(format)>
Example < TIMESTAMP(dd MM yyyy)>

USERNAME


Syntax < USERNAME()>
Example < USERNAME()>

VERSION


Syntax < VERSION()>
Example < VERSION()>

IIF


Syntax < IIF(string,string,string,string)>
Example < IIF(*CUSTOMER_ID*,SELF,Internal,External)>

EXPIRYDATE


Syntax < EXPIRYDATE(format)>
Example < EXPIRYDATE(dd MM yyyy)>