Condition

Introduction

This document provides a comprehensive guide to understanding and using the Condition component within the Automate platform. Conditions are essential programming commands used to process decisions based on boolean evaluations. The Condition component allows users to create logic branches and execute actions based on the results of these conditions.

The purpose of the Condition component is to facilitate the execution of different computations or actions depending on whether a programmer-defined boolean condition evaluates to true or false. It enhances the control and flow of actions within workflows by enabling users to create conditional logic.

What is the Condition Component?

The Condition component in Automate allows users to create, configure, and execute various types of conditions. These conditions include IF, ELSE IF, and ELSE, each serving a specific purpose in decision-making processes.

Key Features

  • IF Condition: Perform actions based on whether a condition evaluates to true.

  • ELSE IF Condition: Additional conditions for sequential evaluation.

  • ELSE Condition: Actions executed when no prior conditions are met.

  • Configurable Parameters: Customize conditions based on boolean, string, number, date, data table, dictionary, length, or ping evaluations.

  • Nested IF Clauses: Insert IF clauses within other IF clauses for complex logic.

How To Use Action

IF Condition

Description: The IF Condition allows users to create a decision branch based on a specified condition.

Usage:

  1. Create an IF Condition:

    • Click on the "Add Condition" button in the configuration form.

    • Select the condition type from the drop-down menu.

    • Fill in the condition modal with the appropriate values:

      • Boolean: Compare true or false values.

      • String: Compare source and target values with operators like "is equal," "is not equal," "contains," "is empty," or "is not empty."

      • Number: Compare two numerical values or variables.

      • Date: Compare two date values or variables.

      • Data Table: Compare a data table variable for row or column count.

      • Dictionary: Compare two dictionary variables.

      • Length: Compare the length of two arrays or variables.

      • Ping: Check the availability of a selected IP address or machine.

    • Change the relation between conditions using "And" or "Or" from the configuration form.

    • Delete or edit the condition by clicking on the three dots on the right side of the condition.

Sample String Condition:

When the condition is met, drag and drop actions from the left activities menu into the IF action.

ELSE IF Condition

Description: The ELSE IF Condition allows users to add additional conditions for sequential evaluation.

Usage:

  • Users cannot add ELSE IF conditions without preceding IF or ELSE IF conditions.

ELSE Condition

Description: The ELSE Condition defines actions to be executed when none of the prior conditions are met.

Usage:

  • No "Add Condition" part is required for the ELSE Condition.


Additional Tips

Last updated