If/Else Block

Use the If/Else block to test for a condition and only run certain blocks depending on the results of the test.

For example, you may wish to check if accounts in your source system are still active. If they are active, update the target system, but if accounts are not active, delete them from the target instead. To accomplish this task, do the following:

Using The If/Else Block

  1. Drag and drop the operation blocks you want to use for your If/Else processing onto the workspace. Note that you can nest any Source or Target operations, as well as a For Each Child or even another If/Else block.
  2. Select the If/Else block.
  3. Select the General link from the Properties panel. From here, you can:
    • Change the labels to add more details about the If or Else operations.
    • Add a description.
    Note: You can leave either the If or Else clause empty.
  4. Select the Condition tab and define one or more Boolean conditions for the If/Else actions. The condition must evaluate to True or False. See Boolean Conditions for more details.
    Note: If the condition evaluates to True, TIBCO Cloud™ Integration - Connect always processes the blocks nested within the If. If the condition evaluates to False, the blocks within the Else are processed.
  5. When you run the flow, TIBCO Cloud™ Integration - Connect evaluates the condition(s) within the If/Else Block, and branches depending on whether the condition evaluates to True or False.
Note: Depending on your requirements, you can use the Result Fields to look at the results from a previous block, such as a Lookup block.

Block Properties - General Tab

After you drag and drop the If/Else block into your flow, change the labels to add more details about the If or Else operations.

Block Properties - Condition Tab

Define one or more Boolean conditions. A Boolean condition is a statement that evaluates to either true or false. For example, does the value in the Name field equal "Dave". If the value does equal "Dave", the condition is true. TIBCO Cloud™ Integration - Connect uses the defined condition to determine the execution of the flow.

Boolean Conditions

The Conditions in the If/Else block determine which set of blocks to run. If the rule has both ANDs and ORs, all of the ANDs are evaluated first. In the example below there are several combinations of data values that would evaluate to True.

And/Or

Field

Operator

Value

 

Customers.CompanyName

equals

"McDonald's"

or

Customers.CompanyName

equals

"Burger King"

and

Customers.CreditAmount

is greater than

1000

or

Customers.CreditAmount

is greater than

5000

These settings are interpreted by TIBCO Cloud™ Integration - Connect as follows: 

( CompanyName = McDonalds OR (CompanyName = Burger King AND CreditAmount > 1000) OR CreditAmount > 5000)

To evaluate to TRUE, the record must meet at least one of these three conditions:

Block Properties - Errors and Warnings Tab

If there are any errors or warnings for this block, the Errors and Warnings tab displays the number of errors or warnings in the tab name. See Block And Flow Errors And Warnings.

Once you have corrected the errors, select the Validate button to update the Errors and Warnings tab.

Related Topics

Control Blocks

For Each Child Block

Loop Block

Loop Exit Block