Condition
Branches execution into True or False based on one comparison.
@lainstack/flow/condition · Flow
How to use it
Section titled “How to use it”Use this block to send the run down one of two paths from one typed comparison. It leaves on true or false, and the output matched holds the same answer. For many exact values use @lainstack/flow/switch. To stop the run on a mismatch use @lainstack/flow/assert. For several checks with a report use @lainstack/flow/checklist.
- One block tests one comparison. Chain blocks to test more.
- The operators depend on the value type, for example
is_yesfor yes or no,contains_itemfor lists,has_fieldfor records,beforeandafterfor dates. - If an operand has no value, for example it refers to a block that did not run on this path, the step fails with
comparison_invalid. It does not takefalse. - Text equality ignores letter case unless
comparison.settings.matchCaseis true. Outer spaces count unlesscomparison.settings.trimisouter. - Number and date equality accept
comparison.settings.tolerance. - A Null comparison needs a reference or an explicit Null literal.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Value type | comparison.kind |
One of Text, Number, Yes or no, Null, List, Record, Date, Date/time |
Default text. |
| Value | comparison.left |
Text | |
| Comparison | comparison.operator |
One of Equals, Does not equal, Contains, Does not contain, Starts with, Ends with, Is empty, Is not empty, Greater than, Greater than or equal, Less than, Less than or equal, Is Yes, Is No, Is null, Is not null, Contains item, Does not contain item, Has field, Does not have field, Before, On or before, After, On or after |
|
| Compare with | comparison.right |
Text |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Matched | matched |
Yes or no |
| Exit | Port | Notes |
|---|---|---|
| True | true |
|
| False | false |