If Text Contains Action—Setting Properties

The If Text Contains action searches for a particular string or expression within a target, such as a variable or a dataset field. It is used to initiate a block of steps to be performed either if the text is found or if it is not found. Any variable or dataset to be searched must be created in an earlier step.

When you create an If Text Contains step, an End If step is created automatically. Place the steps to be performed if the condition is met between the If Test Contains step and the End If step. The steps within the block should be indented for visual clarity.

To set If Text Contains properties

  1. From the Task Builder Available Actions pane, open the Flow folder and double-click the If Text Contains action or drag it into the Steps pane.

  2. Select Text contains or Text does not contain.

  3. In the Target text box, enter the target to be searched. To enter a variable or dataset, click the Insert Expression/Variable button and use the Expression Builder to insert it.

  4. In the Text to look for box, enter the text to look for within the target text.

  5. To make the search case sensitive, select Case Sensitive.

  6. If the text to look for is an expression, select Regular Expression.

  7. If you want to place the matched text or the index for the location of the text into a variable, click the Advanced tab and select from the applicable drop-down lists. The index given will be the first character position where the text is found. (The variables must be created in earlier steps using the Create Variable action.)

  8. To set the Description tab properties, refer to Description Tab Options.

  9. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  10. When finished, click OK to save settings and close the properties dialog window.

To auto-indent after all steps are added

  1. In the Task Builder Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.

  2. Click the Format button .

See Also

About Actions

Adding Task Steps

If Text Contains Action

End If Action-Properties