Recognized Functions inside the expression part of the If command | |||||||
Type | Functions | Recognized operators in the expression | |||||
String | string() | + | plus | Not tested | |||
concat() | - | minus | Not tested | ||||
starts-with() | = | Equal | |||||
contains() | != | Not Equal | |||||
substring-before() | < | less than | |||||
substring-after() | <= | less than or equal to | |||||
substring() | > | greater than | |||||
string-length() | >= | greater than or equal to | |||||
normalize-space() | |||||||
translate() | |||||||
Boolean | boolean() | IMPORTANT | |||||
not() | and | boolean and | have to be in small letters | ||||
true() | or | boolean or | AND And Or OR are not acceptable | ||||
false() | Use only: and or | ||||||
lang() | |||||||
Number | number() | ||||||
sum() | |||||||
floor() | |||||||
ceiling() | |||||||
round() | |||||||
Examples: | |||||||
"{Location}"!=concat("Toro","nto") and string-length("{Location}")>5 | |||||||
translate('{Location}', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')='toronto' | |||||||
NEW | if and select statements can be used in paragaraph command | ||||||
if statement | Syntax | !!if condition%%string if true%%string if false!! | |||||
Example | !!if "{City}"="Toronto"%%Toronto is returned%%Not Correct!! | ||||||
select statement | Syntax | !!select value%%"value1"##string if value=value1%%"value1"##string if value=value1%%"value1"##string if value=value1!! | |||||
or | |||||||
!!select | value | %% | value1 | ## | return string if value=value1 | ||
%% | value2 | ## | return string if value=value2 | ||||
%% | value3 | ## | return string if value=value3 | ||||
!! | |||||||
Example | !!select "{Colour}"%%"Red"##Selected Colour is Dark Red%%"White"##Selected Colour is Bright White%%"Green"##Selected Colour isForest Green!! | ||||||
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article