--- title: "Has Operator" slug: "has-operator" description: "Learn how to use the Has operator to check key existence in data tables, ensuring accurate role and permission management in your workflows." updated: 2025-11-12T09:49:50Z published: 2025-11-12T14:27:26Z canonical: "docs.unqork.io/has-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. # Has Operator UDesignerClassic Designer ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(209).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) The **Has operator** checks whether a specific key exists in an object. When a match is found, the operator outputs a Boolean value of **true**; otherwise, the output is **false**. It’s important to remember that the Has operator only verifies the existence of a key. It does not validate the value stored under that key or determine whether the key has a defined value. Additionally, the Has operator only searches top-level keys. It cannot detect keys nested in other objects. Below are some considerations when using the Has operator: - The Has operator only works with **objects** as inputs. - You cannot connect a [Data Table](https://docs.unqork.io/docs/data-table-component) component directly to the Has operator because a table is an **array of objects**. - To use the Has operator with a table, first extract a single object using the [Get operator](https://docs.unqork.io/docs/getoperator). - The Get operator retrieves one row (object) from the array, which you can then input into the Has operator for evaluation. Let’s say you have a Data Table listing internal and external company roles, such as **Manager** and **Client**. Another column in the table defines the permissions for each role, either **Administrative** or **Authenticated**. 1. Use a **Get** operator to retrieve the first row from the table. 2. Then connect the **Has** operator to check if a permission key exists for that role. > In this setup, you’ll use the **column header** for example, `permissions` as the operator’s key. 3. If the first row contains a permissions key, the **Has** operator outputs **true**. If it doesn’t, the output is **false**. You'll find the Has operator under the [Object](https://docs.unqork.io/docs/object-operators) group to the left of the [Data Workflow](https://docs.unqork.io/docs/unqorks-data-workflow-operators) canvas. ## 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. | | Preserve Argument Type | When selected, this setting ensures the argument data type is respected when the operator executes. | | Path | The Has operator looks for this reference key in the data from the input operator. If the path given to the Has operator matches the key found in the input data, the output is **true**. If the paths don't match between the previous operator and the Has operator, the output is **false**. The Has operator's path must match the input path exactly. If not, then the output is **false**. For example, let's say the input path is `dogNames`. If you enter **dog** as the Has operator path, the output is **false**. The only acceptable path for this example is `dogNames`. | ## Adding a Has Operator In this example, you'll use the Has operator to confirm that the `roleType` key exists in the first row of your Data Table component. You'll use a Get operator to select the first row of the table, then use the Has operator to confirm if the key exists. If the key exists in the first row, the output of the Has operator will be **true**. If not, it’ll be **false**. > [!NOTE] > These instructions assume you have a module open, saved, and with a title. ### Configure the Data Table Component Start by configuring a [Data Table](https://docs.unqork.io/docs/data-table-component) component to create some sample data with `roleName` and `roleType` columns. Now, enter four different roles in `roleName` column and assign each role either Administrative or Authenticated permissions in the `roleType` column. 1. In the Module Builder, drag and drop a **Data Table** component onto your canvas. 2. In the **Property ID** field, enter `dtRoles`. 3. In the data table, enter the following: | roleName | roleType | | --- | --- | | Manager | Administrative | | Developer | Administrative | | Customer | Authenticated | | Client | Authenticated | ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(211).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 4. Click **Save Component**. ### Configure the Data Workflow Component Next, set up your Data Workflow and use the Has operator to confirm if the key exists. If the key exists in the first row, the output of the Has operator will be **true**. If not, it’ll be **false**. 1. Drag and drop a **Data Workflow** component onto your canvas, placing it below your `dtRoles` **Data Table** component. 2. In the **Property ID** and **Canvas Label Text** fields, enter `dwfHasSingleObject`. #### 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 | dtRoles | | Required | No | | Source | Default | #### Configure the Get Operator 1. Drag and drop a **Get** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Get | | Label | Get First Row | | Path | [0] | 3. Connect the output port (right) of the `dtRoles` **Input** operator to the input port (left) of the `Get First Row` **Get** operator. #### Configure the Has Operator 1. Drag and drop a **Has** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Has | | Label | Has roleType | | Path | roleType | 3. Connect the output port (right) of the `Get First Row` **Get** operator to the input port (left) of the `Has roleType` **Has** 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 | dtRoles | 3. Connect the output port (right) of the `dtRoles` **Input** operator to the input port (left) of the `dtRoles` **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 | Get Path [0] | 3. Connect the output port (right) of the `Get First Row` **Get** operator to the input port (left) of the `Get Path [0]` **Console** operator. #### Configure the Third Console Operator 1. Drag and drop the final **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Path [0] Has roleType? | 3. Connect the output port (right) of the `Has roleType` **Has** operator to the input port (left) of the `Path [0] Has roleType?` **Console** operator. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(214).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 4. Click **Save Component**. ### Configure the Button Component Now, configure a [Button](/v1/docs/button-component) component that you can click in Express View to trigger your Data Workflow. 1. Drag and drop a **Button** component onto your canvas, placing it below your `dwfHasSingleObject` **Data Workflow** component. 2. In the **Property ID** field, enter `btnHasSingleObject`. 3. In the **Label Text** field, enter `Get the Has`. 4. From the **Action Type** drop-down, select **Event**. 5. In the **Trigger On Click** field, enter `dwfHasSingleObject`. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(215).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 6. Click **Save Component**. 7. **Save** your module. Here's how the completed example looks in the Module Builder: ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(216).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) Here's how the completed example works in Express View, including a peek at the DevTools Console: ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Has_04.jpg?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) Preview your module in Express View, and open up the DevTools Console. Click the **Get the Has** button and expand the three Consoles. First, you'll see the Get operator single out the first row of your Data Table. Next, the Has operator determines if this row of the table contains the `roleType` key. It does, so the output from the Has operator is **true**. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Has_07.jpg?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(210).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) The **Has operator** checks whether a specific key exists in an object. When a match is found, the operator outputs a Boolean value of **true**; otherwise, the output is **false**. It’s important to remember that the Has operator only verifies the existence of a key. It does not validate the value stored under that key or determine whether the key has a defined value. Additionally, the Has operator only searches top-level keys. It cannot detect keys nested in other objects. Below are some considerations when using the Has operator: - The Has operator only works with **objects** as inputs. - You cannot connect a [Data Table](https://docs.unqork.io/docs/data-table-component) component directly to the Has operator because a table is an **array of objects**. - To use the Has operator with a table, first extract a single object using the [Get operator](https://docs.unqork.io/docs/getoperator). - The Get operator retrieves one row (object) from the array, which you can then input into the Has operator for evaluation. Let’s say you have a Data Table listing internal and external company roles, such as **Manager** and **Client**. Another column in the table defines the permissions for each role, either **Administrative** or **Authenticated**. 1. Use a **Get** operator to retrieve the first row from the table. 2. Then connect the **Has** operator to check if a permission key exists for that role. > In this setup, you’ll use the **column header** for example, `permissions` as the operator’s key. 3. If the first row contains a permissions key, the **Has** operator outputs **true**. If it doesn’t, the output is **false**. You'll find the Has operator under the [Object](https://docs.unqork.io/docs/object-operators) group to the left of the [Data Workflow](https://docs.unqork.io/docs/unqorks-data-workflow-operators) canvas. ## 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. | | Preserve Argument Type | When selected, this setting ensures the argument data type is respected when the operator executes. | | Path | The Has operator looks for this reference key in the data from the input operator. If the path given to the Has operator matches the key found in the input data, the output is **true**. If the paths don't match between the previous operator and the Has operator, the output is **false**. The Has operator's path must match the input path exactly. If not, then the output is **false**. For example, let's say the input path is `dogNames`. If you enter **dog** as the Has operator path, the output is **false**. The only acceptable path for this example is `dogNames`. | ## Adding a Has Operator In this example, you'll use the Has operator to confirm that the `roleType` key exists in the first row of your Data Table component. You'll use a Get operator to select the first row of the table, then use the Has operator to confirm if the key exists. If the key exists in the first row, the output of the Has operator will be **true**. If not, it’ll be **false**. > [!NOTE] > These instructions assume you have a module open, saved, and with a title. ### Configure the Data Table Component Start by configuring a [Data Table](https://docs.unqork.io/docs/data-table-component) component to create some sample data with `roleName` and `roleType` columns. Now, enter four different roles in `roleName` column and assign each role either Administrative or Authenticated permissions in the `roleType` column. 1. In the Module Builder, drag and drop a **Data Table** component onto your canvas. 2. In the **Label** and **Property Name** fields, enter `dtRoles`. 3. In the data table, enter the following: | roleName | roleType | | --- | --- | | Manager | Administrative | | Developer | Administrative | | Customer | Authenticated | | Client | Authenticated | ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(217).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 4. Click **Save**. ### Configure the Data Workflow Component Next, set up your Data Workflow and use the Has operator to confirm if the key exists. If the key exists in the first row, the output of the Has operator will be **true**. If not, it’ll be **false**. 1. Drag and drop a **Data Workflow** component onto your canvas, placing it below your `dtRoles` **Data Table** component. 2. In the **Canvas Label Text** and **Property Name** fields, enter `dwfHasSingleObject`. #### 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 | dtRoles | | Required | No | | Source | Default | #### Configure the Get Operator 1. Drag and drop a **Get** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Get | | Label | Get First Row | | Path | [0] | 3. Connect the output port (right) of the `dtRoles` **Input** operator to the input port (left) of the `Get First Row` **Get** operator. #### Configure the Has Operator 1. Drag and drop a **Has** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Has | | Label | Has roleType | | Path | roleType | 3. Connect the output port (right) of the `Get First Row` **Get** operator to the input port (left) of the `Has roleType` **Has** 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 | dtRoles | 3. Connect the output port (right) of the `dtRoles` **Input** operator to the input port (left) of the `dtRoles` **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 | Get Path [0] | 3. Connect the output port (right) of the `Get First Row` **Get** operator to the input port (left) of the `Get Path [0]` **Console** operator. #### Configure the Third Console Operator 1. Drag and drop the final **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Path [0] Has roleType? | 3. Connect the output port (right) of the `Has roleType` **Has** operator to the input port (left) of the `Path [0] Has roleType?` **Console** operator. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Has_06.jpg?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 4. Click **Save**. ### Configure the Button Component Now, configure a [Button](/v1/docs/button-component) component that you can click in Express View to trigger your Data Workflow. 1. Drag and drop a **Button** component onto your canvas, placing it below your `dwfHasSingleObject` **Data Workflow** component. 2. In the **Property ID** field, enter `btnHasSingleObject`. 3. In the **Label Text** field, enter `Get the Has`. 4. From the **Action Type** drop-down, select **Event**. 5. In the **Trigger On Click** field, enter `dwfHasSingleObject`. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(218).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) 6. Click **Save & Close**. 7. **Save** your module. Here's how the completed example looks in the Module Builder: ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/image(219).png?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) Here's how the completed example works in Express View, including a peek at the DevTools Console: ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Has_04.jpg?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) Preview your module in Express View, and open up the DevTools Console. Click the **Get the Has** button and expand the three Consoles. First, you'll see the Get operator single out the first row of your Data Table. Next, the Has operator determines if this row of the table contains the `roleType` key. It does, so the output from the Has operator is **true**. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Has_07.jpg?sv=2026-02-06&spr=https&st=2026-11-10T12%3A00%3A21Z&se=2026-11-10T13%3A00%3A21Z&sr=c&sp=r&sig=yWzWImTmLkyiFjyhG%2ByKSkqnKIkDpkcCRAgAHIWqtIw%3D) A key-value pair is a fundamental data structure where a unique "key" is associated with a specific "value," used for organizing and retrieving data efficiently, like in dictionaries or databases. An object is a type of data structure that represents a single, self-contained entity that acts as a container for the characteristics of that entity. The Boolean data type accepts one of two values: true, or, false. A key-value pair is a fundamental data structure where a unique "key" is associated with a specific "value," used for organizing and retrieving data efficiently, like in dictionaries or databases. An object is a type of data structure that represents a single, self-contained entity that acts as a container for the characteristics of that entity. An array is a type of object that stores one or more data types. Data types supported in arrays include numbers, strings, and objects. Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. A Property ID is the unique field ID used by Unqork to track and link components in your module. Canvas Label Text indicates the purpose of the corresponding field or component. For non-input components, the Canvas Label Text isn't end-user facing, and only appears in the . Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View. 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. Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. The action performed by the button when selected. DOM (Document Object Model) events are signals or notifications that something has occurred or is occurring within a web page, often triggered by user interactions or by the browser itself. These events allow JavaScript to react to changes and interactions on a web page, making it dynamic and interactive. Enter the Property ID of the component that you want to trigger on each button-click. The DevTools Console helps you securely store, build, test, and deploy your software. A Property ID is the unique field ID used by Unqork to track and link components in your module. ## Related - [Introduction to Data Workflow](/introduction-to-data-workflow.md) - [Data Workflow Component](/data-workflow-component.md) - [Data Workflow Operators](/data-workflow-operators.md)