Conditions
    • PDF

    Conditions

    • PDF

    Article Summary

    What are Model Conditions?

    Model conditions are used to determine the visibility and availability of Webflow components, while interacting with a digital process, according to the value of different transaction data items.

    NOTE
    If you want to skip to our How to Videos section and quickly learn how to set simple conditions, click here

    Type of Conditions

    There are two types of conditions:

    • Visibility - display if/hide if
    • Edit (Disable) - enable if/disable if

    Visibility Condition

    This condition determines whether Webflow components (single or multiple under an object) will be visible or not. 

    Edit (Disable) Condition

    This condition determines whether Webflow components (single or multiple under an object) will be editable or not. 

    Condition Structure

    (See Figure 1)

    The structure of both conditions is similar. Each condition contains at least one logical expression with a selector, operator, and value. 

    The only difference is the switch that sets the result of the condition:

    • Display if/Hide if (1) - sets the result of the condition, if the fields of the digital process will be visible or not.
    • Enable if/Disable if (2) - sets the result of the condition, if the fields of the digital process will be editable or not.

    Display if/Hide if - sets the result of the condition, if the fields of the digital process will be visible or not. Enable if/Disable if - sets the result of the condition, if the fields of the digital process will be editable or not.

    Figure 1: Conditions Switch

    The rest of the fields and options are identical for both conditions (see Figure 2 and Table 1):

    Conditions Structure.

    Figure 2: Conditions Structure

    Table 1: Conditions Structure

    Number

    Name

    Description

    Condition

    Enables to set the type of the condition:

    • no condition
    • formula - the Formula Editor enables EasySend's platform users to use built-in operators, functions, and model data items to create simple and complex conditions, logical expressions, and calculations
    NOTE
    To access the Formula Editor article, click here
    • simple - a condition with a logical expression
    • custom - a condition created by using code (not covered in this article)
    • if prefilled - a condition that is applied according to a pre-filled state, this condition is used to pre-populate data from other systems or services (not covered in this article) 
    NOTE

    This article will focus on the simple condition only

    Selector

    Enables to set the field that its value will be compared against the Operator to trigger the condition, the field can be a:

    • Transaction data item
    • Metadata item within the Model (like an Id of a step)
    NOTE

    For additional information about Workflow Manager and steps, see the Workflow Manager Overview article

    Operator

    Enables to select between four options that trigger the condition:

    • is
    • isn’t
    • greater than
    • less than

    Value

    Enables to set a string that is compared against the Selector according to the selected Operator to trigger the condition.

    + Add

    Enables to add additional logical expressions to the condition

    NOTE
    When two or more logical expressions are set, it is mandatory to add an operation between them - and/or

    Simple Condition Usage Example

    A common usage for a condition is to control the structure of a Webflow, to condition when Webflow components will appear and when they will not appear. Figure 3 displays a Webflow with six Text Input components and a Radio Question component. The visibility of The last three Text Input components - Spouse’s First Name, Spouse’s Last Name, and Spouse’s Age, depends on the Radio Question option selection. If the selection is Married, then they will appear:

    Webflow with Input Text and Radio Question Components.

    Figure 3: Webflow with Input Text and Radio Question Components

    Figure 4 displays the Model of the Webflow. The Model has transaction data items for each component added to the Webflow. The components for the spouse information are grouped under an object transaction data item named spouseDetails (1). This object will be implemented with a condition (2) that will determine its visibility, the transaction data items nested inside the object will inherit the condition as well:

    The Model has transaction data items for each component added to the Webflow. The components for the spouse information are grouped under an object transaction data item named spouseDetails. This object will be implemented with a condition that will determine its visibility, the transaction data items nested inside the object will inherit the condition as well.

    Figure 4: The Model

    The type of the condition is set to no by default. When changing it to simple (3), the logical expression parameters - Selector (4),
    Operator (5) and Value (6) appear. In addition, theicon will appear next to the transaction data item that is implemented with the condition (see Figure 5):

    The type of the condition is set to no by default. When changing it to simple, the logical expression parameters - Selector, Operator and Value appear. In addition, the icon will appear next to the transaction data item that is implemented with the condition.

    Figure 5: simple Condition

    The spouseDetails transaction data item object and the transaction data items nested inside will appear only if the following condition is met (see Figure 6):

    • maritalStatus (Selector) (7).
    • is (Operator) (8).
    • Married (Value) (9).

    The spouseDetails transaction data item object and the transaction data items nested inside will appear only if the following condition is met: maritalStatus (Selector), is (Operator), Married (Value).

    Figure 6: Setting the Condition

    If the transaction data item to add is nested inside an object, write and select the object first and then input a dot (.) and select the transaction data item within the object. It is also possible to input two dots (..) and then select the transaction data item within the object (see Figure 7):

    If the transaction data item to add is nested inside an object, write and select the object first and then input a dot (.) and select the transaction data item within the object. It is also possible to input two dots (..) and then select the transaction data item within the object.

    Figure 7: Nested Transaction Data Item

    When the Webflow is active, at first, the fields for the spouse’s information are not visible (see Figure 8):

    Webflow 1 of 2.

    Figure 8: Webflow 1 of 2

    but when the marital status is set to Married, the condition specified in the Model is met, and the spouse fields appear (see Figure 9):

     Webflow 2 of 2.

    Figure 9: Webflow 2 of 2

    How to Videos

    To quickly learn how to use simple conditions, watch the following videos:

    • Simple Condition Visibility:

    • Simple Condition Edit:

    • Formula Editor:



    Was this article helpful?

    What's Next