Flow editor

If / Else block in flow editor

If / Else block in flow editor

The If / Else block is used to evaluate if a statement is true or false. The if statement executes a statement if a specified condition is truthy. If the condition is falsy, the Or Else statement is executed.

Connect the output of a block to the input of the If/Else block to evaluate a value. Depending on the input value, the evaluation results in true or false.

Example:

If the value entered in the first form is greater than 10, the 'Greater then 10' Form will be displayed. If the value is less than 10, the Form 'Less then 10' is displayed.

flow-general-if-example-1-2

Select the If / Else block and use Connect Data.

flow-general-if-example-2-3

The input value from the first form is connected to input A. The constant with the value 10 with the input B. The preview value 15 evaluates to true because 15 is greater than 10.

Result:

True or false.

Tips and best practices:

If / Else blocks can be nested to any depth.

Library:

General

Similar posts

Subscribe to our newsletter

Stay up to date on upcoming news and topics of creating web apps without code.