Page History
Panel | ||||||
---|---|---|---|---|---|---|
TSLsequence [[[#]]]sequenceUse this operator to add a sequence-number to each instance in a set of instances. Note: The sequence operator returns the sequence-number of the FOREACH loop that it is used in. It is not the sequence in which the instances where created. The sequence number starts at 0. Syntax
Input
Example Suppose you want to create an overview of all registered users. Then you could create the following message:
If you have three registered users: John Doe, Jane Doe and Mr X your user list would look like this: 0 Doe, John 1 Doe, Jane 2 X, Mr Or you want to create a comma separated list that contains all users:
Than the result would look like this: John Doe, Jane Doe, Mr X. | ||||||
Panel | ||||||
TSL formats [[[expression{format}]]]There are two different types of formatting available in TSL, number formats and date formats. Both formats are applied to attributes or expressions in the same way. Syntax
Inputs
Numbers In TSL, you can use number formats to change the appearance of numbers, without changing the number behind the appearance. The number format you apply does not affect the actual value. In this context a number can be any of the following basetypes; number, integer, currency or percentage. The number formats used in TSL are common Java decimal formats. The most commonly used formatting symbols are listed below. For a complete documentation we refer to the online java documentation that is available at https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/DecimalFormat.html. | ||||||
Symbol | Name | Meaning | ||||
0 | Digit_zero | displays insignificant zeros if a number has fewer digits than there are zeros in the format | ||||
# | Digit | displays only significant digits and does not display insignificant zeros | ||||
, | Thousand separator | The integer portion of a number is often split into groups by a grouping separator. Western numbers generally separate numbers into thousands, or groups of 3 digits. However, other styles exist. | ||||
. | Decimal separator | The separator between integer and fractional parts of a number | ||||
- | Minus sign | Sign to specify a negative value | ||||
; | Sub pattern separator | Separates formatting for positive and negative numbers | ||||
% | Percentage sign | Multiply by 100 and show as percentage | ||||
¤(ALT_0164) | Currency sign | Use localized currency symbol (for € sign simply use ALT_0128) | ||||
‘ | Escape character | Use special characters as ordinary characters |
UI Text Box |
---|
Note that the formatting depends on the language that is used. This means that when you specify a thousand separator |
Examples
Dates
In TSL, you can use date formats to change the appearance of dates, without changing the date behind the appearance. The date format you apply does not affect the actual value.
These symbols are used to create a format pattern.
Examples
NOW{hh:mm a}
Back to top |
---|