Target Variables Examples

Following are examples that show how different logic affect the values used to set Target variables.

Finding Customer URL

In this example, the Target variable is always set, showing how the results of one step can overwrite the value that was used to set a Target variable from an earlier step.

You are adding customer information to a database where customers have a URL, an email address, or both. You want to use either of those values in a subsequent step, so you use two SEEK steps: one to look for a Customer URL, one to look for a Customer email. One Target variable holds the value of the field that each successful SEEK step found.

Because Insight always sets the Target variable value, this solution either returns an email address or null, but never a URL. You can add logic to your solution to control what value is returned in the Target variable.

If you want to find customer URLs, you can modify the logic to run the second SEEK step, which looks for an email address, only when a URL value is not found:

Finding customer ID

In this example, the Target variable is always set, but if it is set with a non-null value, that value is never overwritten.

You are updating a customer database with information for both new and existing customers, and you want to use the Company ID from all the updated or new customers in a subsequent step. A SEEK step looks for an email address to determine if the Customer record exists, returns the record, and sets the Target variable to the Customer ID of the record. If the email does not exist, you use an INSERT step to create a new customer record, then you return the record and set the Target variable to the Customer ID of the new record:

See Also

About Target Variables