The Set Outputs operator outputs data from the Data Workflow to multiple locations. You can use this operator to output the same value to 2 or more locations. It's important to note that it doesn't output different values to different locations.
You can also use this operator to trigger multiple components. Most components have a single Trigger setting. So, using the Set Outputs operator is a good way to trigger more than one component at once. You can choose up to 5 components.
Similar Data Workflow Operators
The Set Outputs operator is almost identical to the Output operator. Here are the operators compared:
Set Outputs operator: Outputs data from the Data Workflow to multiple locations.
Output operator: Outputs data from the Data Workflow to one location.
About the Info Window
Here's what the Set Outputs operator looks like, along with its Info window:
And here's a breakdown of each setting in the Info window:
Setting | Description |
---|---|
Component | Your output destination or the component where you want the output value sent. Select the component you want to reference from the drop-down menu. Your selection displays as the operator's label. Only your selection in the first Component field shows on your Data Workflow canvas.
|
Component 1-5 | Here, you link the additional output locations. Each extra field lets you choose a component to reference in your Data Workflow. Select a unique Property ID from each drop-down. If you reference fewer than 5 extra components, leave the rest empty. |
Action | The action you want to output in your Data Workflow. The most common action is value, which outputs the value of your data to another component in your module. You can also choose an action to perform when the Data Workflow ends. |
setValue | To push a text or number value to the output locations, enter the value here. |
Adding the Set Outputs Operator
To demonstrate the Set Outputs operator, you'll create a simple module. If the end-user clicks a button, both fields populate with Not Applicable
.
Here's how the completed use case looks in the Module Builder:
Configure the Text Field Components
First, add two Text Field components to serve as the output components.
Drag and drop two Text Field components onto your canvas.
Enter the following Property IDs and Label Text:
Property ID
Label Text
jobTitle
Job Title
salary
Salary
Save each component as you add it.
Configure the Data Workflow Component
Next, you'll set up the Data Workflow itself.
Drag and drop a Data Workflow component onto your canvas. Place the Data Workflow component under the Text Field components.
In the Canvas Label Text and Property Name fields, enter
dwfValue
.
Configure the Create Value Operator
Drag and drop a Create Value operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Create Value
Label
Create GO Value
Expression/Value
"yes"
Configure the Set Outputs Operator
Drag and drop a Set Outputs operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Set Outputs
Component
jobTitle
Component 1
salary
Action
Value
setValue
Not Applicable
Connect the output port (right) of the Create Value operator to the input port (left) of the Set Outputs operator.
Click Save.
Configure the Button Component
Lastly, to trigger the Data Workflow, add a Button component.
Drag and drop a Button component onto your canvas, placing it above your Data Workflow component.
In the Property ID field, enter
btnValue
.In the Label Text field, enter
Not Applicable
.Select Event as the Action Type.
In the Trigger on Click field, enter
dwfValue
.Click Save.
Save your module.
In Express View, test the Data Workflow. Click the button, and you'll see both fields populate with Not Applicable.
Resources
Data Workflow: Introduction to Output Operators
Lab
You can view the complete lab here: https://training.unqork.io/#/form/5f52855a811147022224e2ae/edit.