The If Then data converter allows for specification of a list of if-then rules that determine the output of the converter.
The list can consist of multiple if conditions and has always one else block at the bottom, which provides the default value.
If Contains, If Does Not Contain, If Starts With and If Ends With condition types provide a check into whether the input string contains, does not contain, starts with or ends with the given string accordingly.
If Matches Pattern and If Does Not Match Pattern condition types provide a check into whether the input string matches or does not match a pattern.
The basic conditions of the If Then data converter can be configured using the following properties.
The else statement of the If Then data converter can be configured using the following property.
In the If Matches Pattern the expression in
the Then attribute can
refer to submatches of the pattern in the preceding If Matches Pattern field using the $n
In all the other conditions the INPUT keyword can be used to refer to the input text.
The If Then data converter can additionally be configured using the following properties:
Let us assume that the input text is "911" and we want the output text to be "Porsche 911". Alternatively, if the input text is anything other than "911", it should remain as is.
The If Then data converter should then be configured as follows: