Logic
    • PDF

    Logic

    • PDF

    Article summary

    The Logic navigation item contains elements with which you can create and check various conditions and logical expressions.

    • true / false: Elements for checking whether an expression is true or false.

    • if-do / else-if / else / do: Elements for the configuration of conditional expressions.

    • and / or: This allows you to create more complex logical expressions to check whether several conditions are fulfilled ("and" = and operator), or whether at least one of the conditions is fulfilled ("or" = or operator)

    • not: Element, which describes that a expression does not apply ("is not").

    • contains: Operator for comparing two elements. This checks whether a certain expression is contained in another expression.

    ⚠️ Note on the configuration of the following examples

    The following examples show exemplary rules. In order to display the result of a rule (i.e. the content of a created field) on the result page, the field must always also be configured via the Result Page workbench navigation item. For the sake of clarity, we do not show this step in the examples. Please refer to the related article.


    Example 1: Configuration of a text field depending on a selected answer (if-then logic)

    Rule: IF the answer Brush is selected, THEN the platform generates the text field Text Brush with the content You need brushes ("Sie brauchen Pinsel").

    1. Open Logic in the right-hand navigation and drag the if-do element into the workspace.

    2. Switch to Post Processor and drag is-selected next to if-do.

    3. Switch to Fields, drag Select to answer next to is-selected. Select the answer from the dropdown (example: Pinsel).

    4. Switch to Post Processor, drag add global field next to do and enter a name for the field (example: Text-Pinsel).

    5. Switch to Text, drag My text next to add global field and enter the text to be displayed on the results page (example: You need brushes; = "Sie brauchen Pinsel").


    Example 2: Configuration of an alternative action (else-if and else)

    Rule:

    IF the answer Brush is selected, THEN the platform generates the text field Text tool with the content You need brushes.

    OTHERWISE: IF the answer paint roller is selected, THEN the platform generates the text field Text-Werkzeug with the content You need paint rollers. (= "Sie brauchen Malerrollen")

    OTHERWISE: None of the two previous conditions apply, i.e. neither brush nor paint roller has been selected. The platform generates the text field Text-Werkzeug with the content You do not need a tool (= "Sie brauchen kein Werkzeug").

    The configuration steps are equivalent to example 1. You must also connect the elements else-if and else . The name of the field remains the same in all three cases. The platform fills the Text tool field with the content of the condition that applies.


    Example 3: Checking the condition whether several answers were selected at the same time

    Use the and and or elements to combine several conditions.

    Rule: IF the answers Brush AND Paint roller have been selected, THEN the platform generates the text field Text-Werkzeug with the content You need brushes and paint rollers.

    1. Open Logic in the right-hand navigation and drag the if-do element into the workspace.

    2. Drag the and element directly next to if.

    3. Switch to Post Processor and drag is-selected into the first line of the and element.

    4. Switch to Fields, drag Select to answer next to is-selected. Select the answer from the dropdown (example: brush).

    5. Right-click on is-selected to copy the entire element is-selected: Pinsel and paste it into the second line of the element and.

    6. Click on brushes in the second line and select paint roller ("Malerrolle").

    7. Switch to Post Processor, drag add global field next to do and enter a name for the field (example: Text-Werkzeug).

    8. Switch to Text, drag My text next to add global field and enter the text to be displayed on the result page (example: You need brushes and paint rollers).


    Was this article helpful?

    What's Next