Isolate one line of a multi-line variable
Capturing an area of text from a file that includes multiple lines creates an arrayed variable with each line being an element in the array. For example, the following lines are captured in the variable, CustName:
The email address might not be on the same line for every record, so capturing the email address and setting an EmailAddress variable takes a couplesteps.
- Create a variable EmailAddress to hold the value.
- Create a Set Variable procedure. Enter a name for the procedure and use the variable that contains multiple lines. This example uses CustName:
- In the Set Variable window, select the EmailAddress variable. The EmailAddress variable has a value of the last line of CustName.
- To capture the email address, right click the procedure > Add AND Condition > Contains. Make sure the CustName variable is selected. In the value field, type the at sign (@). We know that every email address includes an at sign, and addresses in our data do not contain at signs.
- The condition requires that the value must include the at sign, which populates the email address to the variable EmailAddress: