Difference between revisions of "Label Functions"

From Commander4j Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== SUBSTRING ==
 
== SUBSTRING ==
<br>
+
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.<BR>
 +
 
 
Syntax    <SUBSTRING(string,start,len)><br>
 
Syntax    <SUBSTRING(string,start,len)><br>
 
Example <SUBSTRING(<*SSCC*>,1,3)><br>
 
Example <SUBSTRING(<*SSCC*>,1,3)><br>
 +
 +
Input      350001611234567890
 +
Output    350
  
 
== LEFT ==
 
== LEFT ==
<br>
+
This function allows you to extract a specified number of characters from the left side of a string<BR>
 
Syntax    <LEFT(string,len)><br>
 
Syntax    <LEFT(string,len)><br>
Example <LEFT(<*SSCC*>,3)><br>
+
Example <LEFT(<*SSCC*>,5)><br>
 +
 
 +
Input      350001611234567890
 +
Output    35000
  
 
== RIGHT ==
 
== RIGHT ==
 
<br>
 
<br>
 
Syntax    < RIGHT(string,len)><br>
 
Syntax    < RIGHT(string,len)><br>
Example < RIGHT(<*SSCC*>,3)><br>
+
Example < RIGHT(<*SSCC*>,6)><br>
 +
 
 +
Input      350001611234567890
 +
Output    567890
  
 
== PADLEFT ==
 
== PADLEFT ==

Revision as of 13:10, 7 March 2014

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

RIGHT


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

Input 350001611234567890 Output 567890

PADLEFT


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

PADRIGHT


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

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)>