Iterators, like the Data Workflow component, often handle only one element of an array at a time. But what if you need to repeat the process to iterate on more elements? In this how-to guide, you’ll learn about a looping Data Workflow to achieve this task. is and how to build one.
What Is a Looping Data Workflow?
Looping Data Workflows let you perform operations on consecutive rows of an array. Imagine you have a list of clients you need to email a renewal notice to. You might have that list in a table like the following:
clientName | clientEmail | product | renewalPrice |
|---|---|---|---|
Chelsea | chelsea@therainbowcompany.com | Many Hue | $1,999 |
Noor | noor@thebuildingcompany.com | Construct It | $3,500 |
Jadzia | jadzia@thebigcompany.com | Oversize | $70,000 |
Alejandro | alejandro@thestartup.com | Grow Up | $1,000 |
To send out these emails manually, you’d use the following process:
Look at the list of clients, and see who needs to be emailed.
Retrieve the necessary details from the first row.
Complete and send the email to the first client.
Return to the list and see if others need to be emailed.
Repeat Steps 2 through 4 until each client on the list has been emailed.
But you don't want to send a generic email to every person on your list. Instead, you want to send a personalized email that follows this template:
To: {{clientEmail}}
Hello {{clientName}},
This is a notification that your product license for {{product}} will renew next year for {{renewalPrice}}. Please contact your account manager if you have any questions.
Best,
Our Company Services
To see how this process works with a looping Data Workflow, look at the following diagram.

Here, Step 1 is some form of an input. In our example, this would be a table storing your client data. Step 2 is some form of logic to determine which row is next. In our case, it looks for which index in your table is next. Data from the next index is sent into the operation, which is represented by Step 3. In our case, this operation is sending an email to your client. At Step 2, if there are no additional indexes to process, the loop finishes. Then, it concludes at Step 4.
Configuration
This configuration can seem complex, but keep in mind the five steps you'd take to send these emails manually.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
Begin by configuring a Data Table component to store your client list and their information.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID and Label Text fields, enter
dtClients.In the data table, enter the following:
#
clientName
clientEmail
product
renewalPrice
1
Chelsea
chelsea@therainbowcompany.com
Many Hue
$1,999
2
Noor
noor@thebuildingcompany.com
Construct It
$3,500
3
Jadzia
jadzia@thebigcompany.com
Oversize
$70,000
4
Alejandro
alejandro@thestartup.com
Grow Up
$1,000
.png)
Click Save Component.
Configure the First Hidden Component
Each row in your table has a number assigned to it. That number is called the index. Use a Hidden component to add a place for your application to keep track of which row it last processed. Indexes start at 0, indicating the first row. So, set the Default Value to 0. Later, you’ll add logic that increases this number, one value at a time.
Drag and drop a Hidden component onto your canvas, placing it below your Data Table component.
In the Property ID and Label Text fields, enter
index.In the Default Value field, enter
0.Click Save Component.
Configure the First Data Workflow Component
Next, configure a Data Workflow component to create your looping logic.
Drag and drop a Data Workflow component onto your canvas, placing it below your Hidden component.
In the Property ID and Canvas Label Text fields, enter
dwfLoop.
Configure the First Input Operator
This Input operator references your index Hidden component, which determines the row in your data table that needs processing next.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
index
Required
Yes
Source
Default
Configure the First Formula Operator
This Formula operator takes the previous index that was processed (A) and adds 1 to it.
The
Avalue acts as an alias for values passed to the operator.
Drag and drop a Formula operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula Value
Label
Index + 1
Formula/Expression
=SUM(A,1)
Connect the output port (right) of the Input operator to the input port (left) of the Formula operator.
Configure the First Output Operator
This Output operator outputs the data from the Formula operator to the index Hidden component. The formula updates the Hidden component’s Default Value by adding 1 to it. Now, with each loop of the Data Workflow, the value passed to the index Input operator increases by 1.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
index
Action
value
Connect the output port (right) of the Formula operator to the input port (left) of the Output operator.
Configure the Second Input Operator
This Input operator brings your actual client data into your Data Workflow.
Drag and drop another Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtClients
Required
Yes
Source
Default
Configure the Size Operator
For your Data Workflow to understand when all the data has been processed, you’ll use a Size operator to count the number of objects in the array. Meaning the number of clients in your table.
Drag and drop a Size operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Size
Label
How many clients are there?
Connect the output port (right) of the
dtClientsInput operator to the input port (left) of the Size operator.
Configure the Second Formula Operator
This Formula operator creates an expression that determines if your index Hidden component is less than the value returned by your Size operator. You’ll use the following expression: =CONCATENATE(A,"<",_arg), where A is the value from your index Hidden component and _arg is the value located by your Size operator. Later, you’ll use a Decision operator to determine whether this statement is true.
Drag and drop another Formula operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula Value
Label
More clients?
Formula/Expression
=CONCATENATE(A,"<",_arg)
Connect the output port (right) of the
indexInput operator to the input port (left) of theMore clients?Formula operator.Connect the output port (right) of the Size operator to the argument port (top) of the
More clients?Formula operator.
Configure the First Console Operator
You’ll add several Console operators during this configuration to view the data in the DevTools Console in Express View. This Console operator lets you view the result of your More clients? Formula operator.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Condition
Connect the output port (right) of the
More clients?Formula operator to the input port (left) of the Console operator.
Configure the Decision Operator
This Decision operator determines whether there are more emails to send by looking at the expression created by your More clients? Formula operator. If this expression is true, the Decision operator passes your data through its upper output port. If this expression is false, the Decision operator passes your data through its lower output port. So, your dtClients Input operator serves as the input and your More clients? Formula operator serves as the argument.
Your Data Workflow should continue to loop until there are no more rows to input from your Data Table component. So, you're using A<_arg to determine if the number stored in the index Hidden component is less than the total number of rows in the table. After the first loop of the Data Workflow, the value stored in the index Hidden component is 1. In the next loop, the Data Workflow processes the second row of the table (index 1). After your Data Workflow processes the fourth and final row of the table, the value stored in the index Hidden component is 4. This is no longer less than four, so in the next loop, the Decision operator evaluates the A<_arg statement as false to stop the loop.
Drag and drop a Decision operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Decision
Input List
Condition
_arg
Connect the output port (right) of the
dtClientsInput operator to the input port (left) of the Decision operator.Connect the output port (right) of the
More clients?Formula operator to the argument port (top) of the Decision operator.
Configure the Second Console Operator
This Console operator lets you view the data your Decision operator passes to its upper input port.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
True
Connect the upper output port (right) of the Decision operator to the input port (left) of the
TrueConsole operator.
Configure the Third Console Operator
This Console operator lets you view the data your Decision operator passes to its lower input port.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
False
Connect the lower output port (right) of the Decision operator to the input port (left) of the
FalseConsole operator.
Configure the Get Operator
Once you've determined if there are more emails to send, the next step is to retrieve the data needed to send the next email. Here, you’ll connect a Get operator to your Decision operator so your dtClients Data Table component data passes through. Then, set your index Input operator as the argument to remind the Get operator which row of your table is next.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Get
Label
Get Current Row
Path
[_arg]
Connect the upper output port (right) of the Decision operator to the input port (left) of the Get operator.
Connect the output port (right) of the
IndexInput operator to the argument port (top) of the Get operator.
Configure the Fourth Console Operator
This Console operator lets you view the data retrieved by the Get operator.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Current Row
Connect the output port (right) of the Get operator to the input port (left) of the
Current RowConsole operator..png)
Click Save Component.
Configure the Second Hidden Component
Before configuring the rest of your Data Workflow, add a place to store the results. This Hidden component stores each row of data retrieved by your Get operator. Your loop overwrites this each time it runs. So, this component only stores the row you're currently emailing.
Drag and drop a Hidden component onto your canvas, placing it below your Data Workflow component.
In the Property ID and Label Text fields, enter
currentRow.Click Save Component.
Update the First Data Workflow Component
Now that you have a Hidden component to store the results, you’ll update your Data Workflow component to output the data to this Hidden component. Then, you’ll reference this data in a separate Data Workflow later. The second Data Workflow sends your emails, while the first manages your loop.
Hover over the
dwfLoopData Workflow component.A toolbar displays above the component on hover-over.
Using the toolbar, click the
(Settings) button.
Configure the Second Output Operator
This Output operator sends the data to your currentRow Hidden component.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
currentRow
Action
value
Connect the output port (right) of the Get operator to the input port (left) of the
currentRowOutput operator.Click Save Component.
Configure the Second Data Workflow Component
Now that you have your loop configured, set up another Data Workflow component to send your emails.
Drag and drop another Data Workflow component onto your canvas, placing it below your
currentRowHidden component.In the Property ID and Canvas Label Text fields, enter
dwfOperation.
Configure the Input Operator
This Input operator brings in the data stored in your currentRow Hidden component. When sending your emails, you’ll reference this component instead of the larger data table because it stores the data for a single client at a time.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
currentRow
Required
Yes
Source
Default
Configure the Console Operator
This Console operator lets you view the data retrieved from the currentRow Hidden component.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Email Sent
Connect the output port (right) of the Input operator to the input port (left) of the Console operator.
Configure the Output Operator
Next, add an Output operator to trigger your first Data Workflow to run again once an email is sent.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dwfLoop
Action
trigger
Connect the output port (right) of the Input operator to the input port (left) of the Output operator.
.png)
Click Save Component.
Update the First Data Workflow Component
Now that you have a Data Workflow configured to run your operation, configure your first Data Workflow to trigger it. Doing so stops the loop once everyone is sent an email.
Hover over the
dwfLoopData Workflow.A toolbar displays above the component on hover-over.
Using the toolbar, click the
(Settings) button.
Configure the Third Output Operator
Configure another Output operator to trigger the second Data Workflow to run.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dwfOperation
Action
trigger
Connect the output port (right) of the Get operator to the input port (left) of the
dwfOperationOutput operator.
Configure the Fourth Output Operator
Remember, your Decision operator determines whether there are more emails to send. If there aren't, the Decision operator passes data to its lower output port. So, you’ll add an Output operator to stop the looping process.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
_self
Action
value
Connect the lower output port (right) of the Decision operator to the input port (left) of the
_selfOutput operator.Click Save Component.
Configure the Initializer Component
Lastly, add an Initializer component to begin the entire process.
Drag and drop an Initializer component onto your canvas, placing it above your Data Table component.
In the Property ID and Canvas Label Text fields, enter
initLoop.From the Trigger Type drop-down, select
New Submission.In the Outputs table, enter the following:
#
Source
Type
Value
1
dwfLoop
trigger
GO
.png)
Click Save Component.
Save your module.
Here's how your module looks in the Module Builder:
.png)
Preview your module in Express View and open the DevTools Console. Activity from your various Console operators populates, showing the loop is working correctly.
The first section of the image displays the path your first row of data takes through your Data Workflows. Your Condition Console operator displays the expression of 0<4 because it’s the 0 index in your data, and there are 4 items in your table. The True Console operator displays your original data, and the False Console operator displays _BLOCKED because the expression 0<4 is true. From there, your first row of data is separated. You can see this in your Current Row Console operator. Then, you also see that data in your Email Sent Console operator, indicating the data has passed through your second Data Workflow. The Console operators below this data display the rest of your data through the same process. You can expand this data in your DevTools Console to see more details.
The second portion of this image displays where your loop ends. Here, you see 4<4 in the Condition Console operator, showing that your Data Workflow has processed your data with an index of 4. Because 4<4 is a false statement, your data takes that path instead. The True Console operator displays _BLOCKED, and now your data displays under the False Console operator. Once your loop reaches this point, the process stops.
Iterators, like the Data Workflow component, often handle only one element of an array at a time. But what if you need to repeat the process to iterate on more elements? In this how-to guide, you’ll learn about a looping Data Workflow to achieve this task. is and how to build one.
What Is a Looping Data Workflow?
Looping Data Workflows let you perform operations on consecutive rows of an array. Imagine you have a list of clients you need to email a renewal notice to. You might have that list in a table like the following:
clientName | clientEmail | product | renewalPrice |
|---|---|---|---|
Chelsea | chelsea@therainbowcompany.com | Many Hue | $1,999 |
Noor | noor@thebuildingcompany.com | Construct It | $3,500 |
Jadzia | jadzia@thebigcompany.com | Oversize | $70,000 |
Alejandro | alejandro@thestartup.com | Grow Up | $1,000 |
To send out these emails manually, you’d use the following process:
Look at the list of clients, and see who needs to be emailed.
Retrieve the necessary details from the first row.
Complete and send the email to the first client.
Return to the list and see if others need to be emailed.
Repeat Steps 2 through 4 until each client on the list has been emailed.
But you don't want to send a generic email to every person on your list. Instead, you want to send a personalized email that follows this template:
To: {{clientEmail}}
Hello {{clientName}},
This is a notification that your product license for {{product}} will renew next year for {{renewalPrice}}. Please contact your account manager if you have any questions.
Best,
Our Company Services
To see how this process works with a looping Data Workflow, look at the following diagram.

Here, Step 1 is some form of an input. In our example, this would be a table storing your client data. Step 2 is some form of logic to determine which row is next. In our case, it looks for which index in your table is next. Data from the next index is sent into the operation, which is represented by Step 3. In our case, this operation is sending an email to your client. At Step 2, if there are no additional indexes to process, the loop finishes. Then, it concludes at Step 4.
Configuration
This configuration can seem complex, but keep in mind the five steps you'd take to send these emails manually.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
Begin by configuring a Data Table component to store your client list and their information.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID and Canvas Label Text fields, enter
dtClients.In the data table, enter the following:
#
clientName
clientEmail
product
renewalPrice
1
Chelsea
chelsea@therainbowcompany.com
Many Hue
$1,999
2
Noor
noor@thebuildingcompany.com
Construct It
$3,500
3
Jadzia
jadzia@thebigcompany.com
Oversize
$70,000
4
Alejandro
alejandro@thestartup.com
Grow Up
$1,000
.png)
Click Save & Close.
Configure the First Hidden Component
Each row in your table has a number assigned to it. That number is called the index. Use a Hidden component to add a place for your application to keep track of which row it last processed. Indexes start at 0, indicating the first row. So, set the Default Value to 0. Later, you’ll add logic that increases this number, one value at a time.
Drag and drop a Hidden component onto your canvas, placing it below your Data Table component.
In the Property ID and Canvas Label Text fields, enter
index.In the Default Value field, enter
0.Click Save & Close.
Configure the First Data Workflow Component
Next, configure a Data Workflow component to create your looping logic.
Drag and drop a Data Workflow component onto your canvas, placing it below your Hidden component.
In the Canvas Label Text and Property Name fields, enter
dwfLoop.
Configure the First Input Operator
This Input operator references your index Hidden component, which determines the row in your data table that needs processing next.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
index
Required
Yes
Source
Default
Configure the First Formula Operator
This Formula operator takes the previous index that was processed (A) and adds 1 to it.
The
Avalue acts as an alias for values passed to the operator.
Drag and drop a Formula operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula Value
Label
Index + 1
Formula/Expression
=SUM(A,1)
Connect the output port (right) of the Input operator to the input port (left) of the Formula operator.
Configure the First Output Operator
This Output operator outputs the data from the Formula operator to the index Hidden component. The formula updates the Hidden component’s Default Value by adding 1 to it. Now, with each loop of the Data Workflow, the value passed to the index Input operator increases by 1.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
index
Action
value
Connect the output port (right) of the Formula operator to the input port (left) of the Output operator.
Configure the Second Input Operator
This Input operator brings your actual client data into your Data Workflow.
Drag and drop another Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtClients
Required
Yes
Source
Default
Configure the Size Operator
For your Data Workflow to understand when all the data has been processed, you’ll use a Size operator to count the number of objects in the array. Meaning the number of clients in your table.
Drag and drop a Size operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Size
Label
How many clients are there?
Connect the output port (right) of the
dtClientsInput operator to the input port (left) of the Size operator.
Configure the Second Formula Operator
This Formula operator creates an expression that determines if your index Hidden component is less than the value returned by your Size operator. You’ll use the following expression: =CONCATENATE(A,"<",_arg), where A is the value from your index Hidden component and _arg is the value located by your Size operator. Later, you’ll use a Decision operator to determine whether this statement is true.
Drag and drop another Formula operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula Value
Label
More clients?
Formula/Expression
=CONCATENATE(A,"<",_arg)
Connect the output port (right) of the
indexInput operator to the input port (left) of the Formula operator.Connect the output port (right) of the Size operator to the argument port (top) of the Formula operator.
Configure the First Console Operator
You’ll add several Console operators during this configuration to view the data in the DevTools Console in Express View. This Console operator lets you view the result of your More clients? Formula operator.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Condition
Connect the output port (right) of the
More clients?Formula operator to the input port (left) of the Console operator.
Configure the Decision Operator
This Decision operator determines whether there are more emails to send by looking at the expression created by your More clients? Formula operator. If this expression is true, the Decision operator passes your data through its upper output port. If this expression is false, the Decision operator passes your data through its lower output port. So, your dtClients Input operator serves as the input and your More clients? Formula operator serves as the argument.
Your Data Workflow should continue to loop until there are no more rows to input from your Data Table component. So, you're using A<_arg to determine if the number stored in the index Hidden component is less than the total number of rows in the table. After the first loop of the Data Workflow, the value stored in the index Hidden component is 1. In the next loop, the Data Workflow processes the second row of the table (index 1). After your Data Workflow processes the fourth and final row of the table, the value stored in the index Hidden component is 4. This is no longer less than four, so in the next loop, the Decision operator evaluates the A<_arg statement as false to stop the loop.
Drag and drop a Decision operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Decision
Input List
Condition
_arg
Connect the output port (right) of the
dtClientsInput operator to the input port (left) of the Decision operator.Connect the output port (right) of the
More clients?Formula operator to the argument port (top) of the Decision operator.
Configure the Second Console Operator
This Console operator lets you view the data your Decision operator passes to its upper input port.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
True
Connect the upper output port (right) of the Decision operator to the input port (left) of the
TrueConsole operator.
Configure the Third Console Operator
This Console operator lets you view the data your Decision operator passes to its lower input port.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
False
Connect the lower output port (right) of the Decision operator to the input port (left) of the
FalseConsole operator.
Configure the Get Operator
Once you've determined if there are more emails to send, the next step is to retrieve the data needed to send the next email. Here, you’ll connect a Get operator to your Decision operator so your dtClients Data Table component data passes through. Then, set your index Input operator as the argument to remind the Get operator which row of your table is next.
Drag and drop a Get operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Get
Label
Get Current Row
Path
[_arg]
Connect the upper output port (right) of the Decision operator to the input port (left) of the Get operator.
Connect the output port (right) of the
IndexInput operator to the argument port (top) of the Get operator.
Configure the Fourth Console Operator
This Console operator lets you view the data retrieved by the Get operator.
Drag and drop another Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Current Row
Connect the output port (right) of the Get operator to the input port (left) of the
Current RowConsole operator..png)
Click Save.
Configure the Second Hidden Component
Before configuring the rest of your Data Workflow, add a place to store the results. This Hidden component stores each row of data retrieved by your Get operator. Your loop overwrites this each time it runs. So, this component only stores the row you're currently emailing.
Drag and drop a Hidden component onto your canvas, placing it below your Data Workflow component.
In the Property ID and Canvas Label Text fields, enter
currentRow.Click Save & Close.
Update the First Data Workflow Component
Now that you have a Hidden component to store the results, you’ll update your Data Workflow component to output the data to this Hidden component. Then, you’ll reference this data in a separate Data Workflow later. The second Data Workflow sends your emails, while the first manages your loop.
Hover over the
dwfLoopData Workflow.A toolbar displays above the component on hover-over.
Using the toolbar, click the
(Settings) button.
Configure the Second Output Operator
This Output operator sends the data to your currentRow Hidden component.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
currentRow
Action
value
Connect the output port (right) of the Get operator to the input port (left) of the
currentRowOutput operator.Click Save.
Configure the Second Data Workflow Component
Now that you have your loop configured, set up another Data Workflow component to send your emails.
Drag and drop another Data Workflow component onto your canvas, placing it below your
currentRowHidden component.In the Canvas Label Text and Property Name fields, enter
dwfOperation.
Configure the Input Operator
This Input operator brings in the data stored in your currentRow Hidden component. When sending your emails, you’ll reference this component instead of the larger data table because it stores the data for a single client at a time.
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
currentRow
Required
Yes
Source
Default
Configure the Console Operator
This Console operator lets you view the data retrieved from the currentRow Hidden component.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Email Sent
Connect the output port (right) of the Input operator to the input port (left) of the Console operator.
Configure the Output Operator
Next, add an Output operator to trigger your first Data Workflow to run again once an email is sent.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dwfLoop
Action
trigger
Connect the output port (right) of the Input operator to the input port (left) of the Output operator.
.png)
Click Save.
Update the First Data Workflow Component
Now that you have a Data Workflow configured to run your operation, configure your first Data Workflow to trigger it. Doing so stops the loop once everyone is sent an email.
Hover over the
dwfLoopData Workflow.A toolbar displays above the component on hover-over.
Using the toolbar, click the
(Settings) button.
Configure the Third Output Operator
Configure another Output operator to trigger the second Data Workflow to run.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dwfOperation
Action
trigger
Connect the output port (right) of the Get operator to the input port (left) of the
dwfOperationOutput operator.
Configure the Fourth Output Operator
Remember, your Decision operator determines whether there are more emails to send. If there aren't, the Decision operator passes data to its lower output port. So, you’ll add an Output operator to stop the looping process.
Drag and drop another Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
_self
Action
value
Connect the lower output port (right) of the Decision operator to the input port (left) of the
_selfOutput operator.Click Save.
Configure the Initializer Component
Lastly, add an Initializer component to begin the entire process.
Drag and drop an Initializer component onto your canvas, placing it above your Data Table component.
In the Property ID and Canvas Label Text fields, enter
initLoop.From the Trigger Type drop-down, select
New Submission.In the Outputs table, enter the following:
#
Property ID
Type
Value
1
dwfLoop
trigger
GO
.png)
Click Save & Close.
Save your module.
Here's how your module looks in the Module Builder:
.png)
Preview your module in Express View and open the DevTools Console. Activity from your various Console operators populates, showing the loop is working correctly.
The first section of the image displays the path your first row of data takes through your Data Workflows. Your Condition Console operator displays the expression of 0<4 because it’s the 0 index in your data, and there are 4 items in your table. The True Console operator displays your original data, and the False Console operator displays _BLOCKED because the expression 0<4 is true. From there, your first row of data is separated. You can see this in your Current Row Console operator. Then, you also see that data in your Email Sent Console operator, indicating the data has passed through your second Data Workflow. The Console operators below this data display the rest of your data through the same process. You can expand this data in your DevTools Console to see more details.
The second portion of this image displays where your loop ends. Here, you see 4<4 in the Condition Console operator, showing that your Data Workflow has processed your data with an index of 4. Because 4<4 is a false statement, your data takes that path instead. The True Console operator displays _BLOCKED, and now your data displays under the False Console operator. Once your loop reaches this point, the process stops.
