- PDF
Create text and number fields for result page
- PDF
In this article you will find actions that you can use to create fields on the result page. After configuration, the fields contain numerical values, calculation results and/or texts.
These are listed in the user interface of the rules under Select an action > Result field action.
In der Benutzeroberfläche der Rules sind diese unter Select an action > Result field action aufgelistet.
💡All actions in this article create a so-called global field. Global fields are not product-specific. This means that the contents of these fields do not vary depending on the product recommendation, but are standardized or global for all products.
💡Check out the related article to learn more about the principle of conditions and actions.
Create text: Set a result field to a text
1) Simple text
Action: Create a field with a fixed text for the result page.
Click on Select an action > Set a result field to a text.
Enter the name of the field under add global field.
⚠️When entering a name into add global field, avoid spaces and special characters. Underscores and hyphens are allowed.
Enter the desired text under Type in your text.
2) Text field with dynamic number or text input
Action: Create a field for the result page with a text that contains the individual user input from a number or text input field.
Click on Select an action > Set a result field to a text.
Enter the name of the field under add global field.
⚠️When entering a name into add global field, avoid spaces and special characters. Underscores and hyphens are allowed.
Enter the desired text under Type in your text.
Select the desired number or text input field from your questionnaire under Other values > Answer value.
After you have added the field to the result page (see related article), your text appears on the result page with the input from the questionnaire, which changes dynamically depending on the input of the selector users.
3) Text field with calculation result
Action: Create a field for the result page with a combination of text and the result of a calculation.
Click on Select an action > Set a result field to a text.
Enter the name of the field under add global field.
⚠️Vermeide when entering under add global field spaces and special characters. Underscores and hyphens are allowed.
Enter the desired text under Type in your text.
Start the calculation by entering the function math().
Enter the desired calculation in the brackets. See the list of mathematical operators in this article.
⚠️ Note: Configuration of comma values
Use a point for comma values, e.g. 0.2 and not 0,2.
After you have added the field to the result page (see related article), your text appears on the result page with the input from the questionnaire, which changes depending on the input of the selector users.
Perform calculation: Set a result field to a calculated number / value
Action: Create a field with a number or the result of a calculation.
Click on Select an action > Set a result field to a calculated number / value.
Enter the name of the field under add global field. (Avoid spaces and special characters. Underscores and hyphens are allowed).
Enter the desired number or calculation in the gray field on the right (note the list of mathematical operators in this article).
⚠️ Note: Configuration of comma values
Use a point for comma values, e.g. 0.2 and not 0,2.
Use number input from questionnaire in calculation
In order to use a numerical value added by the selector user in the questionnaire in a calculation, you must integrate the corresponding Number Input Field into the calculation. Click on Answer value under Other numeric values and select the desired answer from the dropdown.
⚠️ Note: Only select responses with Number Input Fields
For calculations, you can only select the input from number fields (response type: Number Input Fields). All other question types are not supported in mathematical formulas.
Example: Calculation with Number Input Field
In the following example, the amount of wall paint required is calculated as a function of the wall area.
Click on Select an action > Set a result field to a calculated number / value.
Enter the field name color-amount under add global field.
Start the calculation with an open bracket.
Under Answer value, select the answer Enter wall size in square meters.
Complete the remaining calculation: *0.2)/15 (0.2 stands for the amount of paint required in liters per square meter and 15 for the size of the paint bucket in liters).
List of mathematical operators and functions
Operator / Function | Meaning |
---|---|
( | Open parenthesis |
) | Closed parenthesis |
+ | addition |
- | Subtraction |
* | Multiplication |
/ | division |
math( ) | Starts a calculation* |
min() | Reflects the minimum** |
max() | Returns the maximum** |
round() | Rounds the result to the nearest value** |
floor() | Rounds the result to the next lower value** |
ceil() | Rounds the result to the next highest value** |
*Can be used in the actions Set a result field to a number / calculated value and Set a result field to a text.
**Can be used in the action Set a result field to a number / calculated value.