Document Nodes with Advanced Logic Expressions

  • Updated
  • The default Document Node is designed to be easy-to-use and foolproof, but if you need more advanced operations you can take advantage of the Advanced option in the Document Node Editor. You can use parenthesis, as well as comparison and logical operators to build complex rules.

    Just click the Using Advanced Logic Expressions option, and you can enter expressions, like these shown below:2022-04-27_18-59-29.png

    Examples

    If you have variables named age and state:

    true Always include a node
    (age >= 50) && (state == 'CA') 50 or over from California
    (age < 30) && (age > 20) Age over 20 and under 30
    state in ['CA','WA','OR'] State is one of CA, WA, OR
    (age < 10) || (age > 80) Age is under 10 or over 80


    Demo

    Coming soon...

    Reference

    You can use the following operators when building expressions:

    Type Description Operator
      Always include a node true
    Comparison greater than >
    Comparison greater than or equal to >=
    Comparison less than <
    Comparison less or equal to <=
    Comparison equal to ==
    Comparison not equal to !=
    Comparison identical ===
    Comparison not identical !==
    Containment matches an item in a list in
    Logical and &&
    Logical or ||

    Other Hints:

    • Parentheses can be nested, and will be evaluated from right to left.
    • Only value/variable comparison expressions with optional logical ANDs/ORs, are supported.
    • For text operations, use single quotes!

  • The default Document Node is designed to be easy-to-use and foolproof, but if you need more advanced operations you can take advantage of the Advanced option in the Document Node Editor. You can use parenthesis, as well as comparison and logical operators to build complex rules.

    Just click the Using Advanced Logic Expressions option, and you can enter expressions, like these shown below:

    Examples

    If you have variables named age and state:

    true Always include a node
    (age >= 50) && (state == 'CA') 50 or over from California
    (age < 30) && (age > 20) Age over 20 and under 30
    state in ['CA','WA','OR'] State is one of CA, WA, OR
    (age < 10) || (age > 80) Age is under 10 or over 80


    Demo

    Coming soon...


    Testing Tool

    You can verify all your logic and expressions are working properly by clicking this button:
    This will let you enter up to five variables and values, and will test all the expressions in your document node. 

    Important: Make sure you Save Changes to the logic node first!

    Reference

    You can use the following operators when building expressions:

    Type Description Operator
      Always include a node true
    Comparison greater than >
    Comparison greater than or equal to >=
    Comparison less than <
    Comparison less or equal to <=
    Comparison equal to ==
    Comparison not equal to !=
    Comparison identical ===
    Comparison not identical !==
    Containment matches an item in a list in
    Logical and &&
    Logical or ||

    Other Hints:

    • Parentheses can be nested, and will be evaluated from right to left.
    • Only value/variable comparison expressions with optional logical ANDs/ORs, are supported.
    • For text operations, use single quotes!

  • Throughout 2022 Zingtree will be upgrading customers to our new faster and more modern user experience! Here's how to tell which experience your Zingtree Authors are currently using.

    Log in to your Zingtree Author account and navigate to My Trees. How does your current My Trees page look?

    Zingtree Classic

    2022-02-25_12-24-51.png

    New User Experience

    mceclip0.png

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request