Output Operator: _group Component Setting

Overview

Sometimes your application has more than one output action or value. Instead of configuring each output separately, you can use a single Output operator. Here's where the _group Output operator configuration comes in. Using the _group Component setting, you can dynamically output multiple values or actions.

The first step to setting up the _group output configuration is a Data Table. Your Data Table stores your component IDs, outputs, and output actions. Then, you configure the Output operator on your Data Workflow. Normally, the Output operator outputs your data to a single component. But, for the _group output, you'll make use of the operator's _group Component setting. This configuration uses the output information from your Data Table instead of a component.

Let's say you have a list of U.S. states without assigned capitals. You want to output the capital to each U.S. state. But, you also want to avoid assigning each capital as a separate output. You can use the _group Component setting for this problem. Using the _group output, you can assign capitals to your states with a single output.

You'll start by adding a Data Table. Remember, your Data Table holds your component IDs, outputs, and actions. In this example, component IDs is where you'll store your outputs. Your Data Table outputs are the U.S. capitals. Then, you add U.S. state text fields to receive your outputs. Next, your Data Workflow runs the _group output through a single Output operator. You'll finish with a Button component to trigger the whole operation.

Here's how the completed use case looks in theModule Builder:

Here's how the completed use case looks inExpress View:

What You'll Learn

In this article, you'll learn how to set up and use the _group Component setting.

What You Need

To set up this use case, you need:

  • 1 Data Table component

  • 3 Text Field components

  • 1 Button component

  • 1 Data Workflow component

To set up your Data Workflow, you need:

  • 1 Input operator

  • 1 Output operator

Configuration

Configure the Data Table Component

First, you'll add a Data Table. This component holds the component ID, output, and action for your _group output configuration.

1. Drag and drop a Data Table component onto your canvas.
2. Enter dtStateData in the Label and Property Name fields.
3. In the data table, enter the following:

component_id

component_output

component_action

delaware

Dover

value

kentucky

Frankfort

value

idaho

Boise

value

btnPopulate

yes

disabled

NOTE  For the _group output configuration, the capitalization in your Data Table matters. You must use the same casing as shown in the example.

Configure the Text Field Components

Next, add your Text Fields. You'll use these as the output actions of your _group output configuration.

1. Drag and drop 3 Text Field components onto your canvas. Place your Text Fields below your Data Table.
2. Enter the following Property IDs and Label Text:
Property ID Label Text

delaware

Delaware

kentucky

Kentucky

idaho

Idaho

3. Set the Read Only View toggle to ON.
4. Click Save.

Configure the Data Workflow Component

Now you add your Data Workflow component. You'll bring your data in using an Input operator. Then, you'll add an Output operator with the _group output Component settings. You'll use the _group output configuration to complete the output actions in your Data Table.

1. Drag and drop a Data Workflow component onto your canvas. Place your Data Workflow below your Hidden component.
2. Enter dwfPopulateCapitals in the Label and Property Name fields.

Configure the Input 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

dtStateData

Required

Yes

Source

Default

Configure the Output 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

_group

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

Next, you'll add a Button to trigger your Data Workflow.

1. Drag and drop a Button component onto your canvas. Place your Button component above your Data Workflow component.
2. Enter btnPopulate in the Property ID field.
3. Enter Populate State Capitals Data in the Label Text field.
4. Select Event as the Action Type.
5. Enter dwfPopulateCapitals in the Trigger on Click field.

6. Click Save.
7. Save your module.

Now that you're done, take a look at your module. First, select Preview Module to open the Express View Preview. Then, click the Populate State Capitals Data button. Once you click the button, you'll see the results. The state capital values from your Data Table populate next to each state. The button also follows the Data Table's output action and disables.

Lab

You can view this complete use case here: https://training.unqork.io/#/form/60d209f0c3841b03552cc18e/edit.