--- title: "Convert Value Operator" slug: "convert-value-operator" description: "Learn how to use the Convert Value operator to transform data types like number, integer, and string in the Unqork Designer Platform effectively." updated: 2025-10-28T13:23:05Z published: 2025-10-28T13:23:05Z canonical: "docs.unqork.io/convert-value-operator" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.unqork.io/llms.txt > Use this file to discover all available pages before exploring further. # Convert Value Operator UDesignerClassic Designer ![Settings panel displaying options for converting values and preserving argument types.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(179).png?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D)The **Convert Value operator** lets you take a specific key from a data set and convert the value to a number, integer, or string. Let's review these three data types: - **Number**: This data type is only for numbers. To be clear, we wouldn't classify the word ten as a number, but we would classify the number 10 as a number. This data type also allows for the use of decimals to differentiate it from an integer data type. When converting to a number data type, any original values with non-numeric characters will display as `NaN` (Not a Number) in your final data. To avoid lost data, ensure that your original data does not contain non-numeric characters. - **Integer**: This data type is also for numbers, but it does not allow for decimals. When converting to an integer, a number will only include the number before the decimal. When converting to an Integer data type, any original values with non-numeric characters display `0` in your final data. To avoid lost data, ensure that your original data does not contain non-numeric characters. - **String**: You'll sometimes see strings referred to as text. But this doesn't mean strings can only contain letters. Data stored as a string can include numbers, letters, symbols, and spaces. Strings can be as short as a few letters or contain entire paragraphs. The Unqork Designer Platform handles each data type differently. And sometimes you'll need to convert the data collected from one data type to another. You'll find the Convert Value operator under the [Value/String](/v1/docs/valuestring-operator-types) group to the left of the Data Workflow canvas. ### Similar Data Workflow Operators The Convert Value operator is similar to the Convert Field operator. Here are the operators compared: - **Convert Value operator**: Converts a single value passed to it. It’s best used if you're only working with a single key/value pair of data. - [**Convert Field operator**](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/category/ea7dcee4-4da0-412e-b29b-b743f113c042/en): Converts all values in a specified key of a data set. It’s best used if you're working with large amounts of data that need conversion. ## About the Info Window Here's a breakdown of each setting in the 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. | | Cast To | The final data type you want after the operator performs its conversion. Here, you'll find a drop-down with the following options: - Number - Integer - String | ## Adding a Convert Value Operator In this example, you'll learn how to convert a string into a number using the Convert Value operator. You'll use a [Text Field](/v1/docs/text-field-component) component to ensure that any value you enter will be stored as a string. You'll enter a value in this field in Express View and trigger the Data Workflow with a button. On button-click, the Convert Value operator will convert the string into a number. > [!NOTE] > These instructions assume you have a module open, saved, and with a title. ### Configure the Text Field Component First, you'll set up a [Text Field](/v1/docs/text-field-component) component so your end-user can enter a string to convert. Remember, anything stored in a Text Field component is automatically a string. 1. In the Module Builder, drag and drop a **Text Field** component onto your canvas. 2. In the **Property ID** field, enter `stringInput`. 3. In the **Label Text** field, enter `String Input`. 4. In the **Helper Text** field, enter `Enter a Number`. 5. Click **Save Component**. ### Configure the Hidden Component Next, you'll configure a [Hidden](/v1/docs/hidden-component) component to store your Data Workflow component’s output. 1. Drag and drop a **Hidden** component onto your canvas, placing it below your `stringInput` **Text Field** component. 2. In the **Property ID** and **Label Text** fields, enter `numberOutput`. 3. Click **Save Component**. ### Configure the Data Workflow Component Now, it's time to set up your [Data Workflow](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/view/7353cb62-b083-4c54-ac51-3669348e736a/en) component. First, you'll input your Text Field component into a Convert Value operator. Then, you'll cast any string entered into the Text Field component as a number and output it into your Hidden component. To help you view the progress of your Data Workflow component, you'll configure two Console operators. 1. Drag and drop a **Data Workflow** component onto your canvas, placing it below your `numberOutput` **Hidden** component. 2. In the **Property ID** and **Canvas Label Text** fields, enter `dwfConvertValueNumber`. #### 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 | Value | | --- | --- | | Category | Input | | Component | stringInput | | Required | No | | Source | Default | #### Configure the Convert Value Operator 1. Drag and drop a **Convert Value** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Convert To Value | | Label | Convert String to Number | | Cast To | Number | 3. Connect the output port (right) of the `stringInput` **Input** operator to the input port (left) of the `Convert String to Number` **Convert Value** operator. #### 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: | Setting | Value | | --- | --- | | Category | Output | | Component | numberOutput | | Action | value | 3. Connect the output port (right) of the `Convert String to Number` **Convert Value** operator to the input port (left) of the `numberOutput` **Output** operator. #### Configure the First Console Operator 1. Drag and drop a **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | String Input | 3. Connect the output port (right) of the `stringInput` **Input** operator to the input port (left) of the `String Input` **Console** operator. #### Configure the Second Console Operator 1. Drag and drop another **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Number Output | 3. Connect the output port (right) of the `Convert String to Number` **Convert Value** operator to the input port (left) of the `Number Output` **Console** operator. 4. Click **Save Component**. ![A static image of a workflow illustrating data conversion from string to number with input and output.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(180).png?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) ### Configure the Button Component Now, let's add a [Button](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/view/7e685ead-8415-48df-a9ef-1652caa7d59a/en) component to trigger your Data Workflow. 1. Drag and drop a **Button** component onto your canvas, placing it below the Data Workflow component. 2. In the **Property ID** field, enter `btnConvertToNumber`. 3. In the **Label** **Text** field, enter `Convert String to Number`. 4. From the **Action Type** drop-down, select **Event**. 5. In the **Trigger on Click** field, enter `dwfConvertValueNumber`. ![A Static image of a Button labeled 'Convert String to Number' with action triggers for user interaction.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(181).png?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) 6. Click **Save Component**. 7. **Save** your module. Here's how the completed example looks in the Module Builder: ![A staticimage of the final configuration for converting a string value to a Number](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(182).png?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) **Preview** your module in Express View and open the DevTools Console. Enter a number (with and without a decimal point) or text into your Text Field component and click the **Convert String to Number** button. Each submission will give you a `stringInput` and `numberOutput` **Console** output. Enter a number `500.50` into the field and click the button. Then, run the Angular command. When you expand your data, you'll see `500.50` as your input and `500.5` as your output. Quotation marks around your input show that it's a string. No quotation marks around your output means the conversion was successful. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_07.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) ![A static image of the Interface showing options to convert values with fields for category, label, and cast.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_01.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D)The **Convert Value operator** lets you take a specific key from a data set and convert the value to a number, integer, or string. Let's review these three data types: - **Number**: This data type is only for numbers. To be clear, we wouldn't classify the word ten as a number, but we would classify the number 10 as a number. This data type also allows for the use of decimals to differentiate it from an integer data type. When converting to a number data type, any original values with non-numeric characters will display as `NaN` (Not a Number) in your final data. To avoid lost data, ensure that your original data does not contain non-numeric characters. - **Integer**: This data type is also for numbers, but it does not allow for decimals. When converting to an integer, a number will only include the number before the decimal. When converting to an Integer data type, any original values with non-numeric characters display `0` in your final data. To avoid lost data, ensure that your original data does not contain non-numeric characters. - **String**: You'll sometimes see strings referred to as text. But this doesn't mean strings can only contain letters. Data stored as a string can include numbers, letters, symbols, and spaces. Strings can be as short as a few letters or contain entire paragraphs. The Unqork Designer Platform handles each data type differently. And sometimes you'll need to convert the data collected from one data type to another. You'll find the Convert Value operator under the [Value/String](/v1/docs/valuestring-operator-types) group to the left of the Data Workflow canvas. ### Similar Data Workflow Operators The Convert Value operator is similar to the Convert Field operator. Here are the operators compared: - **Convert Value operator**: Converts a single value passed to it. It’s best used if you're only working with a single key/value pair of data. - [**Convert Field operator**](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/category/ea7dcee4-4da0-412e-b29b-b743f113c042/en): Converts all values in a specified key of a data set. It’s best used if you're working with large amounts of data that need conversion. ## About the Info Window Here's a breakdown of each setting in the 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. | | Cast To | The final data type you want after the operator performs its conversion. Here, you'll find a drop-down with the following options: - Number - Integer - String | ## Adding a Convert Value Operator In this example, you'll learn how to convert a string into a number using the Convert Value operator. You'll use a [Text Field](/v1/docs/text-field-component) component to ensure that any value you enter will be stored as a string. You'll enter a value in this field in Express View and trigger the Data Workflow with a button. On button-click, the Convert Value operator will convert the string into a number. > [!NOTE] > These instructions assume you have a module open, saved, and with a title. ### Configure the Text Field Component First, you'll set up a [Text Field](/v1/docs/text-field-component) component so your end-user can enter a string to convert. Remember, anything stored in a Text Field component is automatically a string. 1. In the Module Builder, drag and drop a **Text Field** component onto your canvas. 2. In the **Property ID** field, enter `stringInput`. 3. In the **Label Text** field, enter `String Input`. 4. In the **Helper Text** field, enter `Enter a Number`. 5. Click **Save & Close**. ### Configure the Hidden Component Next, you'll configure a [Hidden](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/view/adbdf06b-9336-4458-a86c-5d45f46f1b9a/en) component to store your Data Workflow component's output. 1. Drag and drop a **Hidden** component onto your canvas, placing it below your `stringInput` Text Field component. 2. In the **Property ID** and **Canvas Label Text** fields, enter `numberOutput`. 3. Click **Save & Close**. ### Configure the Data Workflow Component Now, it's time to set up your [Data Workflow](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/view/7353cb62-b083-4c54-ac51-3669348e736a/en) component. First, you'll input your Text Field component into a Convert Value operator. Then, you'll cast any string entered into the Text Field component as a number and output it into your Hidden component. To help you view the progress of your Data Workflow component, you'll configure two Console operators. 1. Drag and drop a **Data Workflow** component onto your canvas, placing it below your `numberOutput` **Hidden** component. 2. In the **Canvas Label Text** and **Property Name** fields, enter `dwfConvertValueNumber`. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_05.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) #### 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 | Value | | --- | --- | | Category | Input | | Component | stringInput | | Required | No | | Source | Default | #### Configure the Convert Value Operator 1. Drag and drop a **Convert Value** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Convert To Value | | Label | Convert String to Number | | Cast To | Number | 3. Connect the output port (right) of the `stringInput` **Input** operator to the input port (left) of the `Convert String to Number` **Convert Value** operator. #### 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: | Setting | Value | | --- | --- | | Category | Output | | Component | numberOutput | | Action | value | 3. Connect the output port (right) of the `Convert String to Number` **Convert Value** operator to the input port (left) of the `numberOutput` **Output** operator. #### Configure the First Console Operator 1. Drag and drop a **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | String Input | 3. Connect the output port (right) of the `stringInput` **Input** operator to the input port (left) of the `String Input` **Console** operator. #### Configure the Second Console Operator 1. Drag and drop another **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Number Output | 3. Connect the output port (right) of the `Convert String to Number` **Convert Value** operator to the input port (left) of the `Number Output` **Console** operator. ### Configure the Button Component Now, let's add a [Button](https://portal.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/document/v1/view/7e685ead-8415-48df-a9ef-1652caa7d59a/en) component to trigger your Data Workflow component. 1. Drag and drop a **Button** component onto your canvas, placing it below your Data Workflow component. 2. In the **Property ID** field, enter `btnConvertToNumber`. 3. In the **Label** field, enter `Convert String to Number`. 4. Set the **Action Type** as **Event**. 5. In the **Trigger on Click** field, enter `dwfConvertValueNumber`. ![A static image of a button settings for a workflow module with action types and event ID fields.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_06.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) 6. Click **Save & Close**. 7. **Save** your module. Here's how the completed example looks in the Module Builder: ![A static image of a Module editor interface displaying string input and conversion button for number output.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_02.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) **Preview** your module in Express View and open the DevTools Console. Enter a number (with and without a decimal point) or text into your Text Field component and click the **Convert String to Number** button. Each submission will give you a `stringInput` and `numberOutput` **Console** output. Enter a number `500.50` into the field and click the button. Then, run the Angular command. When you expand your data, you'll see `500.50` as your input and `500.5` as your output. Quotation marks around your input show that it's a string. No quotation marks around your output means the conversion was successful. ![A static image of a console output showing string to number conversion examples and user details in Unqork.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Convert_Value_07.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A40Z&se=2026-11-07T18%3A57%3A40Z&sr=c&sp=r&sig=VR0Cx%2BnpV0NrdBMZohUFkz5LR54fCBxF1SpAkZz7SWU%3D) Triggers activate another component when certain requirements are met. Trigger types include Concurrent, Post, and Error. Some components do not have the ability to trigger others. End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. The Angular command, or data command, is a tool that displays submission data in a browser's developer console. In Express View, enter the following command in the devtool console: angular.element('.unqorkio-form').scope().submission ## Related - [Introduction to Data Workflow](/introduction-to-data-workflow.md) - [Data Workflow Component](/data-workflow-component.md)