Applies to version 2021.1.1; author: Konrad Wojtycza
In WEBCON BPS 2021, the form rules have been enhanced with new functions operating on text such as:
This article presents the configuration and operation of the functions mentioned above on the form created for this purpose.
Configuration of the CONCAT function
To explain how to use the CONCAT function, we have created four text form fields on the form. The content of the Text 1,2,3 form fields is combined using the CONCAT function and displayed in the Concat(Text 1,2,3) form field.
Fig. 1. The operation of the CONCAT function
In the CONCAT function configuration, you must provide input values that will be combined into one string. By default, these values are combined without spaces, so in the presented configuration, each Text form field was separated by a process constant containing a space.
Fig. 2. Sample configuration of the CONCAT form rule
The CONCAT function can work dynamically on the form, i.e., it can be executed after each change in the value of the Text 1, 2, 3 form fields; it can also work statically, e.g., when the form goes from one step to another (on a path)or when a button is clicked.
For the function to work dynamically, in the “Style and behavior” tab we have added a rule that sets the value of the Concat(Text 1,2,3) field on value change of the individual form fields.
Fig. 3. The rule that sets the value of the Concat(Text 1,2,3) field on value change
Configuration of the SPLIT function
Below we can see that the string created by the CONCAT function has been separated with semicolons using the SPLIT function in the Split(Concat(Text 1,2,3) field.
Fig. 4. The operation of the SPLIT function
In the SPLIT function configuration, provide the text that should be separated by the semicolon, and the character to be replaced with the separator (space).
SPLIT [[Text] [The character to be replaced with the separator]]
Fig. 5. Sample configuration of the SPLIT function
The SPLIT function can also work dynamically on the form or statically – after the form goes from one step to another (on a path) or when a button is clicked.
For the function to work dynamically, add the following rule in the "Style and bevahior" tab:
Fig. 6. The rule that clears the value of the Split(Text 1,2,3) field on value change
In the case of the SPLIT function, it is not possible to change the default separator, i.e. the semicolon. If you want to change the semicolon to another character, you can use the STRING REPLACE function (Fig. 7, Fig.8).
Fig. 7. The example configuration of the STRING REPLACE function
Fig. 8. The result of the STRING REPLACE function
Configuration of the INDEX OF function
In the “Searched word” field, enter the string you want to search for in the provided text (the “Text” field). In the “Start a position” field, indicate the search's start position (index of the character from which the search will begin).
Fig. 9. The operation of the INDEX OF function
INDEX OF [[Text] [Search string] [Search start position]]
Fig. 10. Sample configuration of the INDEX OF function
As in the case of the previous functions, the INDEX OF function can be invoked dynamically on the form, or after following the path, selecting a button in the form menu, etc.