Create Table Operator

A static image displaying the Data Workflow component's Create Table Operator icon and configuration window.

The Create Table operator creates an array with one or more empty rows in a Data Workflow. These empty rows can be filled using other operators in the Data Workflow, or at a later time.

To set the number of rows in the array:

  • Hard-code them using the operator's Info window.

  • Use another component as an argument for the operator.

The Create Table operator serves as the start of your Data Workflow, and does not have an input port. It also includes an argument port for determining the value it creates. Connect another operator to the Create Table operator's argument port. Then, in the Expression/Value field, use the _arg value to reference that value.

You can find the Create Value operator under the I/O group to the left of your Data Workflow canvas.

Learn more about each setting in the Create Table operator's Info window:

Setting

Description

Category

Grayed out and non-adjustable setting indicating the operation type.

Label

Sets the label for your operator, displaying below the operator on your Data Workflow canvas.

This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows.

Preserve Argument Type

When selected, this setting ensures the argument data type is respected when the operator executes.

Create Index

When set to YES, the operator creates an index key for each row or object. This field contains an integer value of the index for that row. This index makes it easier to parse or position your data based on the order of the rows.

When set to NO, your operator does not create an index.

You might want an index if you plan to use the Merge or Append operators in your Data Workflow.

Number of Rows

The number you enter here determines how many rows the operator creates. If you need two rows, enter 2.

To use another operator as an argument, connect its output port to the Create Table operator's argument port. Then, enter _arg as your Number of Rows. Your argument operator must output an integer.

For this example, create an empty table with two rows using a Data Workflow component. Then, outptu this data to a Hidden component.

Configure the Hidden Component

Add a Hidden component to store the array you'll create using a Data Workflow.

1. In the Module Builder, drag and drop a Hidden component onto your canvas.
2. In the Property ID and Label Text fields, enter tableOutput.
3. Click Save Component.

Configure the Data Workflow Component

Next, you'll configure a Data Workflow component and use the Create Table operator.

1. Drag and drop a Data Workflow component onto your canvas, placing it above the tableOutput Hidden component.
2. In the Property ID and Canvas Label Text fields, enter dwfTable.

Configure the Create Table Operator

1. Drag and drop a Create Table operator onto your Data Workflow canvas.
2. Configure the operator's Info window as follows:
Info

Category

Create Table

Label

createTable

Preserve Argument Type

☐ (unchecked)

Create Index

Yes

Number of Rows

2

Configure the Output Operator

1. Drag and drop an Output operator onto your Data Workflow canvas.
2. Configure the operator's Info window as follows:
Info

Category

Output

Component

tableOutput

Action

Value

3. Connect the output port (right) of the Create Table operator to the input port (left) of the Output operator.
4. Click Save Component.

Here's how the completed Data Workflow looks:

A static image displaying the configured operators on the Data Workflow canvas.

Configure the Button Component

Lastly, configure a Button component to trigger the Data Workflow.

1. Drag and drop a Button component Icon Button component onto your canvas, placing it below the valueOutput Hidden component.
2. In the Property ID field, enter btnTrigger.
3. In the Label Text field, enter Run DWF Create Table.
4. Navigate to the Actions settings.
5. From the Action Type drop-down, select Event.
6. From the On Click drop-down, enter or select dwfTable.
7. Click Save Component.
8. Save your module.

Your completed module looks like the following:

A static image displaying the complete Data workflow module.

Preview your module in Express View and click Run DWF Create Table. Then, open the DevTools Console and run the Angular command. Expand the  data: and tableOutput fields to see the empty array containing two rows.