Input Operator
Estimated Reading Time: 5 minutes
Overview
The Input operator lets you pull data from a single component into your workflow. You can use an Input operator to:
-
Bring in end-user data from another component in your module.
-
Set dynamic variables in a Data Table by using the binded table setting.
So, with an Input operator, you can easily reference an end-user's name in a Text Field component. Or, you can pull an email address from an Email component. Your Data Workflow can then process those pieces of data.
The Input operator always serves as the start of your Data Workflow, so it only has an output port.
You'll find the Input operator under the I/O group to the left of the Data Workflow canvas.
What You'll Learn
In this article, you'll learn:
About the Info Window
Here's what the Input operator looks like, along with its Info window:
And here's a breakdown of each setting in the Info window:
Setting |
Description |
---|---|
Component |
A component holding data you bring into your Data Workflow. Here, you'll see a drop-down containing every component's Property ID in your module. Select the component you want to reference from the drop-down list. You can also type the name of the component's Property ID in the Component field and it filters the drop-down based on your input. After selecting a Property ID, the Component field remains editable. You can type in the Component field to define a property path or target fields nested under the selected Property ID. Your selection here displays as the operator's label. TIP The Data Workflow component supports using grid referencing syntax to target the Dynamic Grid, Uniform Grid, and Freeform Grid components. Grid referencing syntax supports targeting at the component, column, row, and cell level. To learn more, see the following articles in our In-Product Help: Dynamic Grid: Targeted Logic and Referencing Syntax and Uniform Grid and Freeform Grid: Logic and Referencing Syntax. |
Required |
When set to YES, your Data Workflow doesn't start until a value is present in the chosen component. So, if you selected a Text Field component, the Data Workflow doesn't run if the Text Field is empty. When set to NO, the Data Workflow runs with or without a value in the chosen component. By default, the Required drop-down is set to YES. |
Source |
Sets the type of data the source component contains. To draw the exact value of the component selected earlier, you'll choose Default. If you work with dynamic values, you'll choose Binded Table. This is useful when using dynamic values in a Data Table. If you have dynamic values in a Data Table, select the Data Table under the Component setting. Then, select Binded Table as your Source. To see an example of configuring a Binded Table, read our Binded Table Use Case article. By default, the Source drop-down is set to Default. |
Manually-Defined Inputs
In some cases, you might want to reference an input that doesn't display in the Info window's Component drop-down. For example, Property IDs of components in imported modules.
To reference an input that doesn't display in the Component drop-down:
1. | Select your Input operator. |
2. | In the operator's Info window, select any Property ID from the Component drop-down. The Property ID displays below the Input operator as a label. |
3. | On the Data Workflow canvas, double-click the Input operator's label. The field becomes editable. |
4. | Enter the Property ID to use as an input. |
5. | Click outside the field to save your manually-defined input. |
NOTE Reopening the Data Workflow component might not display your manually-defined input on the canvas, though the connection still exists. Consider using the Data Workflow component's Comment field to note the input.
Adding an Input Operator
To demonstrate an Input operator, you'll turn a Data Table into a single value.
Here's how the completed use case looks in the Module Editor:
Here's how the completed use case works in Express View, including a look at the DevTools Console:
What You Need
To set up this use case, you need:
-
1 Data Table component
-
1 Hidden component
-
1 Button component
-
1 Data Workflow component
To set up your Data Workflow, you need:
-
1 Input operator
-
1 Output operator
NOTE These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
First, add a Data Table to hold some sample data.
1. | Drag and drop a Data Table component onto your canvas. |
2. | In the Label and Property Name fields, enter dtDogs. |
3. | In the data table, enter the following: |
A |
B |
C |
---|---|---|
name |
breed |
color |
Baxter |
Beagle |
Brown |
Scar |
Puggle |
Brown |
Pickles |
Soft-Coated Wheaten Terrier |
Yellow |
Holly |
Golden Retriever |
Golden |
4. | Click Save. |
Configure the Hidden Component
Before you can add your Data Workflow, you need a place to store its output. For that, use a Hidden component.
1. | Drag and drop a Hidden component onto your canvas. Place your Hidden component below your Data Table. |
2. | In the Property ID and Canvas Label Text fields, enter dwfOutput. |
3. | Click Save. |
Configure the Data Workflow Component
Next, set up the Data Workflow itself.
1. | Drag and drop a Data Workflow component onto your canvas. Place your Data Workflow component above your Hidden component. |
2. | In the Canvas Label Text and Property Name fields, enter dwfDogs. |
Configure the Input Data Operator
1. | Drag and drop an Input operator onto your Data Workflow canvas. |
2. | Configure the Input operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Input |
Component |
dtDogs |
Required |
Yes |
Source |
Default |
Configure the Output Data Operator
1. | Drag and drop an Output operator onto your Data Workflow canvas. |
2. | Configure the Output operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Output |
Component |
dwfOutput |
Action |
Value |
3. | Connect the output port (right) of the Input operator to the input port (left) of the Output operator. |
4. | Click Save. |
Configure the Button Component
Finally, to trigger the Data Workflow, add a Button component.
1. | Drag and drop a Button component onto your canvas. Place your Button component above your Data Workflow component. |
2. | In the Property ID field, enter btnTrigger. |
3. | In the Label Text, enter Trigger Data Workflow. |
4. | Select Event as the Trigger Type. |
5. | In the Trigger on Click field, enter dwfDogs. |
6. | Click Save. |
7. | Save your module. |
Now you can test out your Data Workflow. When you click your button, the Data Workflow triggers. The Data Workflow converts your Data Table to a single value, pushing the value to your Hidden component.
Changing an Input Operator's Settings
You can revisit and make changes to this operator.
1. | Click the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the ![]() |
3. | Click the operator to open its Info Window. |
4. | Make changes to the operator's settings as needed. |
5. | Click Save. |
6. | Save your module. |
Copying an Input Operator
You can make a copy of your operator using familiar keyboard settings. You can copy and paste an exact copy of your operator, matching all settings.
1. | Hover over the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the ![]() |
3. | Click the operator you want to duplicate. |
4. | On your keyboard, press Command + C (Mac OS) or Ctrl + C (Windows/Linux) to copy the operator. |
TIP You can copy more than one operator at a time. Hold Command or Ctrl on your keyboard and click all the operators you want to copy. Follow the rest of the steps as usual.
5. | On your keyboard, press Command + V (Mac OS) or Ctrl + V (Windows/Linux) to paste the copied operator(s) to the Data Workflow canvas. |
6. | Click Save. |
7. | Save your module. |
TIP Did you know you can copy an operator and paste it into a different Data Workflow? You'll use the same steps outlined above.
Removing an Input Operator
Lastly, you can delete this operator from your Data Workflow canvas. You can also use these same steps to delete a connection between two operators.
1. | Hover over the Data Workflow component. |
A 5-button toolbar displays above the component on hover-over.
2. | Click the ![]() |
3. | Click the operator you want to delete. |
4. | On your keyboard, press Delete. |
NOTE Once you delete this operator, make sure to connect your remaining operators. If your Data Workflow path doesn't end with an Output or Console operator, your Data Workflow won't work. So, once you delete an operator, make sure to update any remaining paths to end at an Output or Console operator.
5. | Click Save. |
6. | Save your module. |
Lab
You can view this complete lab here: https://training.unqork.io/#/form/5f4d310ac2375b021e67cb39/edit.