[Logic] If
Q100102: [Logic] If
Module used to control execution depending upon logic comparison of values
Parameter | In/Out | Description | Other Info |
---|---|---|---|
Value to evaluate | In | Value to evaluate | |
Value to evaluate against | In | Value to evaluate against | |
Value type | In | Choices: Numeric , Date , Text Data type of values |
Default: Text |
Coalesce to | In | Value to coalesce blank values to. | |
Equal step | In | Step name to go to if values are equal, |
|
Greater than step | In | Step name to go to if evaluate value is greater than evaluate against, |
|
Less than step | In | Step name to go to if evaluate value is less than evaluate against, |
|
Evaluation result | Out | Choices: None , Equal , LessThan , GreaterThan Result of comparison |
(Italics = required parameter)
Notes
The [Logic] If
module allows for a simple comparison operation on a value and has the ability to switch execution of the next step based on the evaluation. The Value to evaluate
parameter is the value that the module uses to base its comparison on. This is usually assigned to an output parameter from a previous step. The value is compared against the value stored in the Value to evaluate against
parameter. This is usually a literal value that you provide for the comparison, but it certainly could also come from the output of some other module if needed. Finally, when doing the comparison, based on how the data values are passed, the module might need a hint as to how to treat the value for the comparison. The Value type
parameter is what gives us the ability to control this evaluation with better precision. By setting it to one of the supported types, Numeric
, Date
, or Text
, the comparison operation will be able to work better with the output values from certain modules. For example, if two values like 0010
and 11
, came from various sources and showed up to this module for comparison, they would be treated very differently if they were compared as Numeric
values versus if they were compared as Text
values. By setting it to one or the other in this example, you can force the comparison operation to behave as you would prefer.
The Coalesce to
parameter is provided as a fallback value to use for the comparison, if the value provided by the Value to evaluate
parameter is blank or null, then the coalesce value can serve as the default value to use.
The Equal step
, Greater than step
, and Less than step
parameters all define a way for the comparison to affect the way this module behaves on completion. The name that you provide for the steps in your job can be provided as the value to these parameters. If the comparison is determined to be of equal, greater than, or less than, the value being compared against, then the step executed after the module completes will be the corresponding named step.
This allows for logical branching within your job definition, and depending on how you use it, can result in jobs that do not always execute all their steps in a linear order.