B2Win Suite Documentation (Under Construction)
ContactB2Data
5.6
5.6
  • B2Win Suite Documentation
  • Scripting
    • B2Win Suite Scripting Overview
    • Scripting in B2Data
      • Custom Script Nodes
        • Custom Script
        • Source Script Node (File)
        • Source Script Node (Table)
        • Source Script Node (Object)
        • If-Else Condition
        • Switch case
        • Condition Node
      • In DataPrep
      • Properties
      • Workflow Applications
        • Workflow #1
        • Workflow #2
    • Getting Started
    • Language Basics
    • Types & Objects
      • Primitives
      • Objects
        • Instant
        • LocalDateTime
        • LocalDate
        • LocalTime
        • JsonNode
        • ObjectNode
        • File
        • SuiteTable
        • Duration
        • Period
      • Arrays & Maps
      • Row, Column, StringColumn
    • Utilities
      • Date & Time
        • InstantUtil
        • GeneralDateUtil
        • LocalDateTimeUtil
        • LocalDateUtil
        • LocalTimeUtil
        • Formatting
        • Timezones
      • Math
      • StrictMath
      • NumericUtil
      • DbUtil
      • DbExecutor
      • StateUtil
      • FileUtil
      • JsonUtil
      • HttpUtil
      • NodeInputReader
      • RandomUtil
      • HashingUtil
      • ShellUtil
      • CompressionUtil
      • Logging
    • Properties
    • Context and System
      • Context
      • System
    • Configurations
      • Workflow Configuration
    • Tutorial
    • Feedback
  • B2Data
    • Tutorials
      • Infor DataFabric to On-Premise Database Replication
      • API (DB replication, Email)
    • Workflow Settings
      • General Settings
      • Global/All Properties
      • Execution Configuration
        • General
        • Runtime
        • Compiler
        • Storage
        • Clean Up
      • Permissions
    • Nodes
      • Scheduler
    • Services Configuration
      • Microsoft Graph
Powered by GitBook
On this page

Was this helpful?

  1. Scripting
  2. Scripting in B2Data
  3. Custom Script Nodes

Condition Node

In Functions

PreviousSwitch caseNextIn DataPrep

Was this helpful?

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 .

  • 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;
}
Utility Classes