String functions

TRIM

Description

This function is used to delete spaces at the beginning and the end of a text.

Syntax

@TRIM( text )

The function contains the following arguments :

Parameter Description Mandatory
text The text to format. Yes

It returns a string.

LENGTH

Description

This function is used to return the number of characters of a text.

Syntax

@LENGTH( text )

The function contains the following arguments :

Parameter Description Mandatory
text The text to calculate the number of characters. Yes

It returns a character number.

LEFT

Description

This function is used to remove the ’n’ characters of a string starting from the beginning.

Syntax

@LEFT( text;[number_of_characters] )

The function contains the following arguments :

Parameter Description Mandatory
text The text of which the characters are removed. Yes
number_of_characters Number of characters to remove from the text (default 0). No

It returns a string.

Examples

@LEFT( "my text" ; 5 )

Description

This function is used to remove the ’n’ characters of a string starting from the end.

Syntax

@RIGHT( text;[number_of_characters] )

The function contains the following arguments :

Parameter Description Mandatory
text The text of which the characters are removed. Yes
number_of_characters Number of characters to remove from the text (default 0). No

It returns a string.

Examples

@RIGHT( "my text" ; 5 )

CONCAT

Description

This function is used to gather several characters strings to make only one.

Syntax

@CONCAT( text1;text2;text3;... )

The function contains the following arguments :

Parameter Description Mandatory
text1;text2;text3;… The strings to gather in order. Yes

It returns a string.

Examples

@CONCAT( "The beginning";" and the end of my text." )

FIND

Description

This function is used to return the starting location of a string in a whole text by reading from left to right by ignoring the letter case.

Syntax

@FIND( characters;[text];[case_sensitive] )

The function contains the following arguments :

Parameter Description Mandatory
characters The researched characters. Yes
text The text containing the researched characters. No
case_sensitive To make the research case sensitive. No

It returns a number.

Examples

@FIND( "My":"My text";false )

REPLACE

Description

This function is used to replace a string by another into a text.

Syntax

@REPLACE( text; characters; replace_with; [global]; [case_sensitive] )

The function contains the following arguments :

Parameter Description Mandatory
text The text containing the characters to replace. Yes
characters The characters to replace. Yes
replace_with The the replacement text. Yes
global To replace each occurrence of the searched characters. No
case_sensitive To make the research case sensitive. No

It returns a string.

Examples

@REPLACE( "My small text";"small";"long";false;false )

LOWERCASE

Description

This function is used to display the entered text in lowercase.

Syntax

@LOWERCASE( text )

The function contains the following arguments :

Parameter Description Mandatory
text The word(s) to put in lowercase. Yes

It returns a string.

UPPERCASE

Description

This function is used to display the entered text in uppercase.

Syntax

@UPPERCASE( text )

The function contains the following arguments :

Parameter Description Mandatory
text The word(s) to put in uppercase. Yes

It returns a string.

NUMBER

Description

This function is used to format a number from a variable of java.lang.Number type.

Syntax

@NUMBER( number;[style];[decimals] )

The function contains the following arguments :

Parameter Description Mandatory
number The number. Yes
style “default” to format the number, “raw” to display the number as raw or via a pattern. No
decimals Specify the number of decimals to display (valid for “default” or “raw”). By default, do not display the decimals. No

It returns a string.

Examples

@NUMBER( 5;"default";0 )

FILESIZE

Description

This function is used to display the file size from a variable of java.lang.Number or java.lang.String type.

Syntax

@FILESIZE( value;[style];[unit] )

The function contains the following arguments :

Parameter Description Mandatory
value The variable or number. Yes
style “default” to format the number or “raw” to display the number as raw. No
unit To display the size style in the right unit: “auto”, “byte”, “kilobyte”, “megabyte”, “gigabyte”, “terabyte”. No

It returns a string.

Examples

@FILESIZE( 652;"default";"auto" )

LOC

Description

This function is used to display a localized text of a translation key since the context. If the text does not exist, the key is displayed. Takes into account the %X-type parameters.

Syntax

@LOC( key; parameter1; parameter2... )

The function contains the following arguments :

Parameter Description Mandatory
key The translation key. Yes
parameter1; parameter2… The values of the %X-type parameters. No

It returns a string.

Examples

@LOC( "LG_MY_KEY" )

LANGLABEL

Description

This function is used to display the language from the language code.

Syntax

@LANGLABEL( language_code )

The function contains the following arguments :

Parameter Description Mandatory
language_code The language used for the translation. Examples: fr,en,de,it. Yes

It returns a string.

Examples

@LANGLABEL( "en" )

MIDDLE

Since Process17.0.0

Description

This function is used to extract the n characters of a string from the start index to the end index.

Syntax

@MIDDLE( "value"; beginIndex ; endIndex )

The function contains the following arguments :

Parameter Description Mandatory
value Text from which characters must be extracted. Yes
beginIndex The begin index. Yes
endIndex The end index. Yes

It returns a string.

Examples

Filling a text field with the contents of part of a string

@MIDDLE( "ABCDE"; 2 ; 4 )