Create Value Operator
Overview
The Create Value operator generates a new data value in a Data Workflow component in the form of the following data types:
Most often, you'll use this operator in tandem with a logic component. For example, to create a value of GO to trigger a Plug-In or Calculator component.
The Create Value operator serves as the start of your Data Workflow and does not have an input port. It also includes an argument for determining the value it creates. Connect another operator to the Create Value 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.
About the Info Window
Learn more about each setting in the Create Value 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. |
Expression/Value |
Sets the value to create and pass to another operator. You can create a number, string, or Boolean value. To create a number, enter the number here. To create a string, enter the string here, surrounded by single quotes. To create a Boolean, enter either TRUE or FALSE. |
Adding a Create Value Operator
To demonstrate a Create Value operator, configure a Data Workflow to create a value of 2 and send it to a Hidden component.
These instructions assume that you have a new module open, saved, and with a title.
Configure the Hidden Component
Before you can add your Data Workflow, you'll configure a Hidden component to store its output.
1. | In the Module Builder, drag and drop a Hidden component onto your canvas. |
2. | In the Property ID and Label Text fields, enter valueOutput. |
3. | Click Save Component. |
Configure the Data Workflow Component
Configure a Data Workflow component to create and send a numerical value to the Hidden component.
1. | Drag and drop a Data Workflow component onto your canvas, placing above the valueOutput Hidden component. |
2. | In the Property ID field, enter dwfCreateValue. |
3. | In theCanvas Label Text, enter dwfCreateValue. |
Configure the Create Value Operator
Configure a Create Value operator to create a value of 2.
1. | Drag and drop a Create Value operator onto your Data Workflow canvas. |
2. | Configure the operator's Info window as follows: |
Info | |
---|---|
Category |
Create Value |
Label |
createNumber |
Preserve Argument Type |
☐ (unchecked) |
Expression/Value |
2 |
Configure the Output Operator
Configure an Output operator to send the new value to the Hidden component.
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 |
valueOutput |
Action |
Value |
3. | Connect the output port (right) of the Create Value operator to the input port (left) of the Output operator. |
4. | Click Save Component. |
Here's how the completed Data Workflow looks:
Configure the Button Component
Lastly, configure a Button component to trigger the Data Workflow.
1. | Drag and drop a ![]() |
2. | In the Property ID field, enter btnTrigger. |
3. | In the Label Text field, enter Run DWF Create Value. |
4. | Set the Action Type to Event. |
5. | In the On Click field, enter or select dwfCreateValue. |
6. | Click Save Component. |
7. | Save your module. |
Here's how the completed use case looks in the Module Builder:
Preview your module in Express View and click Trigger Data Workflow. Then, open the DevTools Console and run the Angular command. You'll see the valueOutput Hidden populates with a value of 2.