Group Input Operator
Overview
One Data Workflow might rely on many data sources. Say you need each of the following data points from your end-user:
-
Name
-
Phone Number
-
Email
First, you collect each of those in a separate component. Then, you use a Group Input operator to combine all 3 into a single object. One Group Input operator lets you reference up to 6 components.
The Group Input operator always serves as an input to your Data Workflow, so it only has an output port.
You'll find the Group Input operator under the I/O group to the left of your canvas.
What You'll Learn
In this article, you'll learn:
About the Info Window
Here's what the Group 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. in the Component field and it filters the drop-down based on your input. After selecting a Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module., 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 A Property ID is the unique field ID used by Unqork to track and link components in your module.. Your selection here displays as the operator's label. NOTE You must make a selection here for the operator to function as expected. Be sure to select one of the components you're referencing here. You'll reference the others in the following Component fields. 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. |
Component 1-5 |
Here, you can add additional components you want to include with your selection above. Remember, the Group Input operator can have multiple inputs. Each extra field lets you choose a component to reference in your Data Workflow. You'll select a unique Property ID from each drop-down. If you're referencing fewer than 5 extra components, you'll leave the rest empty. |
Required |
When set to YES, your Data Workflow doesn't start until a value is present in each of your chosen components. So, if you select a Text Field and an Email component, your Data Workflow doesn't run if either field is empty. When set to NO, the Data Workflow runs with or without a value in your chosen components. This results in an empty string for each blank value. By default, the Required drop-down is set to YES. |
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 a Group Input Operator
To demonstrate a Group Input operator, you'll take values from 3 Text Fields and combine them into a single object.
Here's how the completed use case looks in the Module Builder:
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:
-
3 Text Field components
-
1 Hidden component
-
1 Button component
-
1 Data Workflow component
To set up your Data Workflow, you need:
-
1 Group Input operator
-
1 Output operator
Configure the Text Field Components
First, add 3 Text Field components. You'll use these fields to enter information related to dogs, including Name, Breed, and Color.
1. | In the Module Builder, drag and drop 3 Text Field components onto your canvas. |
2. | Enter the following Property IDs and Label Text: |
Property ID |
Label Text |
---|---|
name |
Name |
breed |
Breed |
color |
Color |
3. | Save each component as you add it. |
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 Text Field components. |
2. | In the Property ID and Canvas Label Text fields, enter dwfGroupInputOutput. |
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 Group Input Operator
1. | Drag and drop a Group Input operator onto your Data Workflow canvas. |
2. | Configure the Group Input operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Group Input |
Component |
name |
Component 1 |
breed |
Component 2 |
color |
Component 3 |
|
Component 4 |
|
Component 5 |
|
Required |
Yes |
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 |
dwfGroupInputOutput |
Action |
Value |
3. | Connect the output port (right) of the Group 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 field, enter Trigger Data Workflow. |
4. | Set Event as the Action 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. First, open your module in Express View and complete your end-user input fields. With your DevTools Console open, click your button to trigger the Data Workflow. The Data Workflow combines the values from each of your Text Fields and puts the resulting value in your Hidden component.
Changing a Group 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 (Settings) button to open the Data Workflow canvas. |
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 a Group 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 (Settings) button to open the Data Workflow canvas. |
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 a Group 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 (Settings) button to open the Data Workflow canvas. |
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. |