1. Home
  2. Docs
  3. NoCode-X Documentation
  4. Actions
  5. Conditionals

Conditionals

Not every series of function calls inside an action has to be fully sequential. NoCode-X allows you to use conditional expressions on the lines between function calls. Based on these expressions, the program can autonomously decide whether the line should be followed or not (meaning the function call is executed).

The two sides of a conditional expression are compared to each other using an equality operator. These two sides are referred to as the Left argument and the Right argument. If the expression is correct, meaning the logical expression is true, the line between the two function calls will be followed. If it is false however, the line will be abandoned.

When an object does not exist, it is equal to null.

Chain conditional expressions together

You can chain different conditions together by choosing a logical operator. This field can be found between every two neighboring conditionals in the Next invocations tab. These are the currently available logical operators in NoCode-X:

OperatorDescription
ANDAn AND expression is true if and only if both expressions on either side of this operator are true, otherwise it is false. In NoCode-X this operation is represented as “&&”.
ORAn OR expression is true if one or more of the two expressions on either side of this operator are true, otherwise it is false. Thus, the OR-expression is only false when both of its expressions are false. In NoCode-X this operation is represented as “||”.

Create a conditional expression

Follow these steps to add a conditional between two function calls:

  1. Connect the two function calls. This is explained on the Function picker page.
  2. Click the line between them.
  3. Open the Next invocations menu on the right. It looks like the first image below.
  4. Click the Add a condition button.
  5. Two tabs appear: Add a condition and Choose an operator. Open the former.
  6. Then, for both the left and the right argument: choose a variable from the scope, enter a string or choose a boolean value.
  7. Choose an equality operator to compare both arguments. A list of all operators is found at the bottom of this article.
  8. An example, where we check whether the first name of the current user equals John, can be seen in the second image below.
  9. Now, you can create additional conditions and chain them together using the operator fields between each condition. The third image shows an example where the expression is true when the current user is either named John or An (or both, but a user can only have one first name).
Next invocations tab without any conditions present.
Condition where the current user must be named John.
Condition where the current user must be named John or An.

All equality operators

  • Equals
  • Is not equal to
  • Does not contain
  • Contains
  • Is bigger than
  • Is smaller than
  • Is bigger or equals
  • Is smaller or equals
  • Is not equal to null
  • Is equal to null

How can we help?