The If control block consists of two parts - If and Else - and has an ending line (End If). It is used to specify a condition. Type an expression in the field which is a certain value of a variable or a constant.
The If control block does not do any specific actions by itself. It is used to determine certain actions that you want to be taken if a condition is fulfilled (true).
However, if the condition is not fulfilled (false) then the program would ignore the actions below the If line and check if you have determined other actions below the Else line. If you haven't, then nothing would be executed.
The If and Else parts are never both executed; you either have a false condition and skip if's actions, or have a true condition and skip else's actions.
You can drag an If control block and drop it inside a workflow working area when a green field appears. Doing so makes it a part of that workflow.
- Place the If block where you would like to check a certain condition;
- Enter a condition in the provided field of the If control block;
- Include actions below the If section;
- Include actions below the Else section if necessary;
- This structure will execute whatever actions you have included in the If section when the condition of the If block is satisfied, or will execute the actions you have included in the Else section when the condition is not satisfied. If there are no actions in the Else section, it will be skipped whether the condition is satisfied or not.
To disable the If Block without deleting it, click on the Disable checkbox.