Size Operator

Prev Next

The Size operator  performs one of two functions in a Data Workflow:

  • Returns the number of characters in a string.

  • Returns the number of elements in an array.

You'll find the Size operator in the Table group to the left of the Data Workflow canvas.

About the Info Window

Here's a breakdown of the 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.

Adding  a Size Operator

First, configure a couple of Text Field components to collect your end-user's name and display the result of the Size operator. Then, set up a Data Workflow to return the number of characters in the entry.

These instructions assume that you have a new module open, saved, and with a title.

Configure the Text Field Components

Begin by configuring two Text Field components. The first Text Field component is an input field for your end-user. The second Text Field component displays the result after the data passes through the Data Workflow. To prevent the end-user from adjusting the value of the second Text Field component, you’ll Disable User Input.

  1. In the Module Builder, drag and drop two Text Field components onto your canvas.

  2. In the Property ID and Label Text fields, enter the following for each component:

    #

    Property ID

    Label Text

    1

    name                        

    Name

    2

    characters          

    Number of Characters

  3. In the characters Text Field component, from the Input Behavior drop-down, select Disable User Input.

  4. Click Save Component after configuring each component.

Configure the Data Workflow Component

Next, configure a Data Workflow component to bring data from your name Text Field component into the Data Workflow using an Input operator. Then, add a Size operator to determine the number of characters in the Name field. Lastly, you'll send the final result to the characters Text field component using an Output operator.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below the characters Text Field components.

  2. In the Property ID and Canvas Label Text fields, enter dwfSize.

Configure the Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Input

    Component

    name

    Required

    Yes

    Source

    Default

Configure the Size Operator

  1. Drag and drop a Size operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Size

    Label

    Number of characters

  3. Connect the output port (right) of the name Input operator to the input port (left) of the number of characters Size operator.

Configure the Output Operator

The Output operator sends the Size operator's value to the characters Text Field component.

  1. Drag and drop an Output operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Output

    Component

    characters

    Action

    value

  3. Connect the output port (right) of the number of characters Size operator to the input port (left) of the characters Output operator.

    A static image displaying the configuration of the dwfSize Data Workflow in the UDesigner.

  4. Click Save Component.

  5. Save your module.

Your completed module looks like the following:A static image displaying the dwfSize Data Workflow in the UDesigner.

                                                       

Preview your module in Express View and enter a name in the Name field. Notice how the Size operator returns the character count in the Number of Characters field.

A static image displaying the Express View for Size operator.

Information panel displaying size category and label options for user input.

The Size operator  performs one of two functions in a Data Workflow:

  • Returns the number of characters in a string.

  • Returns the number of elements in an array.

You'll find the Size operator in the Table group to the left of the Data Workflow canvas.

About the Info Window

Here's a breakdown of the 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.

Adding  a Size Operator

First, configure a couple of Text Field components to collect your end-user's name and display the result of the Size operator. Then, set up a Data Workflow to return the number of characters in the entry.

These instructions assume that you have a new module open, saved, and with a title.

Configure the Text Field Components

Begin by configuring two Text Field components. The first Text Field component is an input field for your end-user. The second Text Field component displays the result after the data passes through the Data Workflow. To prevent the end-user from adjusting the value of the second Text Field component, you’ll Disable User Input.

  1. In the Module Builder, drag and drop two Text Field components onto your canvas.

  2. In the Property ID and Label Text fields, enter the following for each component:

    #

    Property ID

    Label Text

    1

    name                        

    Name

    2

    characters          

    Number of Characters

  3. In the characters Text Field component, from the Input Behavior drop-down, select Disable User Input.

  4. Click Save & Close after configuring each component.

Configure the Data Workflow Component

Next, configure a Data Workflow component to bring data from your name Text Field component into the Data Workflow using an Input operator. Then, add a Size operator to determine the number of characters in the Name field. Lastly, you'll send the final result to the characters Text field component using an Output operator.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below the characters Text Field component.

  2. In the Canvas Label Text and Property Name fields, enter dwfSize.

Configure the Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Input

    Component

    name

    Required

    Yes

    Source

    Default

Configure the Size Operator

  1. Drag and drop a Size operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Size

    Label

    Number of characters

  3. Connect the output port (right) of the name Input operator to the input port (left) of the number of characters Size operator.

Configure the Output Operator

The Output operator sends the Size operator's value to the characters Text Field component.

  1. Drag and drop an Output operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Description

    Category

    Output

    Component

    characters

    Action

    value

  3. Connect the output port (right) of the number of characters Size operator to the input port (left) of the characters Output operator.

    A static image displaying the configuration of the dwfSize Data Workflow component in the Classic Designer.

  4. Click Save.

  5. Save your module.

Your completed module looks like the following:Input fields for name and character count with a highlighted size indicator.

                                                       

Preview your module in Express View and enter a name in the Name field. Notice how the Size operator returns the character count in the Number of Characters field.

A static image displaying the Express View for Size operator.