Skip to content

Conditional If/Then/Else

The Conditional If/Then/Else action allows you to create decision-making logic within your package. It lets you execute a set of actions conditionally based on specific criteria. If the condition in the Begin Conditional If/Then action is true, the actions within the block execute; otherwise, they are skipped.

For more details, see this Conditional Wikipedia topic.

  1. Start an If block by adding a “Begin Conditional If/Then” action.
  2. Add all actions to execute if the condition is true.
  3. Close the If block with an “End Conditional If/Then” action.
  4. Optionally, insert an “Else Conditional If/Then” action between the Begin and End for an alternate path.

This setup evaluates the value of a variable to decide the execution path:

If block example

Properties of “Begin Conditional If/Then”

Section titled “Properties of “Begin Conditional If/Then””

This action starts an If block.

Property NameData TypeDescription
OperatorTOperatorDetermines how Variable1 is compared to Variable2 (see operators below).
Variable1VarNameLeft operand: the variable or value to be compared.
Variable2 (Value)StringRight operand: the value or variable to compare against Variable1.
  • Equals: Checks if Variable1 equals Variable2.
  • NotEqual: Checks if Variable1 does not equal Variable2.
  • GreaterThan: Checks if Variable1 is greater than Variable2.
  • LessThan: Checks if Variable1 is less than Variable2.

Properties of “End Conditional If/Then”

Section titled “Properties of “End Conditional If/Then””

This action closes an If block. It has no properties.

Properties of “Else Conditional If/Then”

Section titled “Properties of “Else Conditional If/Then””
  • If the condition is false, actions within the Else branch execute.
  • It must be placed between Begin Conditional If/Then and End Conditional If/Then actions.
  • It has no properties.

Error Detection for Missing “End If/Then”

Section titled “Error Detection for Missing “End If/Then””

When you compile your project, Paquet Builder automatically checks for missing End Conditional If/Then actions to ensure your logic is complete.