IF

The IF function compares the inputs against the Compare condition, then returns the specified True or False value.

If the output from this component is directed to a CHOICE component's first input stream, it can be used to determine which of the CHOICE component's input streams are output.

Input

Number of Connections: Min: 1/Max:4
InputData TypeDescription
Input1AllData
Input2AllSets the Data property. (optional)
Input3AllSets the True property. (optional)
Input4AllSets the False property. (optional)

Output

OutputData TypeDescription
Output1All

If the result is true, the specified True value is returned.

If the result is false, the specified False value is returned.

Property

NameProperty TypeDescription
DataAllDefines the data to be compared against the first input stream's data.
Comparechoice Specifies the comparison logic to be used against the inputs.
Input 1 is placed on the left side of the comparison symbol, and the Data or Input 2 is placed on the right side of the comparison symbol.


= - Compares if Input1 and the Data are equal.
!= - Compares if Input1 and the Data are not equal.
> - Compares if Input1 is greater than the Data. In the case of a String, the comparison is made with respect to the string's dictionary ordering.
>= - Compares if Input1 is greater than or equal to the Data.
< - Compares if Input1 is less than the Data.
<= - Compares if Input1 is less than or equal to the Data.
TrueStringSpecifies what is output if the comparison is true.
FalseStringSpecifies what is output if the comparison is false.

Topic

The comparison data, defined either in the Data property or by Input 2, is cast to the same data type as Input 1, and then the comparison is made.
Below is an example of a comparison made between different types and the results:

Property NameProperty Value
Data5
Compare>

If Input 1 is the Integer value 100, the comparison above will be true. If Input 1 is a String of value "100", the above comparison will result in false.


Example

PropertyOutput
Input 11024Data5121
Compare>=
True1
false2