Condition Node

In Functions

Apply conditions and filters to your workflow.

In case you need one or more paths in the workflow to work on special conditions, you can drag the condition node and then write a condition script that returns true or false. When the condition value is true, then the condition node passes the input it received to the next node connected to it. If the condition value is false, then the condition node will not pass the input and next nodes in the current path will not be executed.

In the condition script, you can use the node input value which could be file or data.

  • Use ctrl+space for autocomplete

  • Type util to get all function groups, pick one and then type a dot to view all functions within the group you selected. All Utility Classes are available at Utility Classes.

  • Use NodeInputReader to get the nodes input object.

For example, you might use it to check if the price of a specific row is grater than 1.3

// Read input data and store it as a DataFrame named 'table'
var table = NodeInputReader.inputAsDataFrame();

// Check if the 't_pric' (Price) value in the 1st row of the DataFrame is greater than 1.3
if (table.doubleColumn("t_pric").getDouble(0) > 1.3) {
    // Return true if the condition is met
    return true;
} else {
    // Return false if the condition is not met
    return false;

Last updated