Get Operator
Overview
The Get operator retrieves a single data point from a large data set. Creators Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. can also use this operator to retrieve an entire row from a table or array.
To use the Get operator, Creators need a data reference key to locate the data to retrieve. The reference key looks different depending on the amount of data you want to retrieve:
-
[0]: This reference key points to an entire row. Using this key retrieves the entire first row of your data set.
-
[0].name: This reference key builds on the first, leading to a single value in the first row of your data set. Using this key returns only the value labeled name from that row.
You'll notice that [1] does not represent the first row of your data set. Arrays begin at [0] when creating your reference keys.
You can also use the Get operator to reference global variables. You'll first create a global variable key and value. Then, use the Get operator to reference the variable's key. This configuration works in conjunction with your Input operator. After setting the Input operator's Component setting to vars, you can use your global variable. This is a powerful feature that lets you easily reference data in all your Unqork environments.
For more information on creating global variables, view our Global Variables Administration article.
You'll find the Get operator under the Array group to the left of your Data Workflow canvas.
About the Info Window
Learn more about each setting in the Get 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. |
Path |
This is the reference key leading to the data you want to retrieve. For example, [0] references the first row in your data set. And the key [0].name references the column labeled name in that first row. Or, you can use this field to reference a global variable key. |
Adding a Get Operator
For this example, create a Data Table component that stores a list of countries and their capitals. Then, set up a Data Workflow component with two Get operators. One Get operator retrieves an entire row of data, and the other retrieves a single value.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
First, you'll add a Data Table component to store some sample data.
1. | In the Module Builder, drag and drop a ![]() |
2. | In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter dtCountries. |
3. | In the data table, enter the following: |
A | B | |
---|---|---|
1 |
country |
capital |
2 |
Afghanistan |
Kabul |
3 |
Albania |
Tirana |
4 |
Algeria |
Algiers |
5 |
Cambodia |
Phnom Penh |
6 |
Czech Republic |
Prague |
7 |
Andorra |
Andorra la Vella |
8 |
Austria |
Vienna |
4. | Click Save Component. |
Configure the Hidden Component
Next, add a Hidden component to store the output from the Get operator retrieving a full row of data.
1. | Drag and drop a Hidden component onto your canvas, placing it below your dtCountries ![]() |
3. | Click Save Component. |
Configure the Text Field Component
Configure a Text Field component to hold the output for the Get operator retrieving a single value. That way, you can display the value in Express View 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..
1. | Drag and drop a Text Field component onto your canvas, placing it below your firstRow Hidden component. |
2. | In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter fifthCountry. |
3. | In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. field, enter Fifth Country. |
4. | From the Input Behavior drop-down, select Disable User Input. |
5. | Click Save Component. |
Configure the Data Workflow Component
Next, you'll add a Data Workflow component and an Input operator to retrieve the data from the Data Table component. Then, add two Get operators—one to retrieve the first row of your data set and one to retrieve a single value. Lastly, you'll add two Output operators to output your results.
1. | Drag and drop a Data Workflow component onto your canvas, placing it between the dtCountries ![]() |
2. | In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter dwfGet. |
Configure the Input Operator
1. | Drag and drop an Input operator onto your Data Workflow canvas. |
2. | Configure the Input operator's Info window as follows: |
Info | |
---|---|
Category |
Input |
Component |
dtCountries |
Required |
Yes |
Source |
Default |
Configure the Get First Row Get Operator
1. | Drag and drop a Get operator onto your Data Workflow canvas. |
2. | Configure the Get operator's Info window as follows: |
Info | |
---|---|
Category |
Get |
Label |
Get First Row |
Preserve Argument Type |
☐ (unchecked) |
Path |
[0] |
3. | Connect the output port (right) of the dtCountries Input operator to the input port (left) of the Get First Row Get operator. |
Configure the firstRow Output Operator
1. | Drag and drop an Output operator onto your Data Workflow canvas. |
2. | Configure the Output operator's Info window as follows: |
Info | |
---|---|
Category |
Output |
Component |
firstRow |
Action |
value |
3. | Connect the output port (right) of the Get First Row Get operator to the input port (left) of the firstRow Output operator. |
Configure the Get Fifth Country Get Operator
1. | Drag and drop a second Get operator onto your Data Workflow canvas. |
2. | Configure the Get operator's Info window as follows: |
Info | |
---|---|
Category |
Get |
Label |
Get Fifth Country |
Preserve Argument Type |
☐ (unchecked) |
Path |
[4].country |
Remember, [0] is the first row. So, [4] retrieves data from the fifth row.
3. | Connect the output port (right) of the dtCountries Input operator to the input port (left) of the Get Fifth Country Get operator. |
Configure the fifthCountry Output Operator
1. | Drag and drop a second Output operator onto your Data Workflow canvas. |
2. | Configure the Output operator's Info window as follows: |
Info | |
---|---|
Category |
Output |
Component |
fifthCountry |
Action |
value |
3. | Connect the output port (right) of the Get Fifth Country Get operator to the input port (left) of the fifthCountry Output operator. |
Here's how the completed Data Workflow looks:
4. | Click Save Component. |
5. | Save your module. |
Your completed module looks like the following:
Preview your module in Express View 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.. You'll see the Fifth Country Text Field populates with Czech Republic. This is the country from the fifth row of your Data Table component, returned by your Get Fifth Country Get operator. Open the DevTools Console The DevTools Console helps you securely store, build, test, and deploy your software. and run the Angular command 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. Expand the ▶ data: tab to see the first row of data returned by your Get First Row Get operator.
Overview
The Get operator retrieves a single data point from a large data set. Creators Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. can also use this operator to retrieve an entire row from a table or array.
To use the Get Operator, Creators need a data reference key to locate the data to retrieve. The reference key looks slightly different depending on how much data you want:
-
[0]: This reference key points to an entire row. Using this key retrieves the entire first row of your data set.
-
[0].name: This reference key builds on the first, leading to a single value in the first row of your data set. Using this key returns only the value labeled name from that row.
You'll notice that [1] doesn't point to the first row of your data set. Remember that arrays start at [0] when creating your reference keys.
You can also use the Get operator to reference global variables. You'll first create a global variable key and value. Then, you'll use the Get operator to reference the variable's key. This configuration works in conjunction with your Input operator. After setting the Input operator's Component setting to vars, you can use your global variable. This is a powerful feature that lets you easily reference data in all your Unqork environments.
For more information on creating global variables, view our Global Variables Administrationarticle.
You'll find the Get operator under the Array group to the left of your Data Workflow canvas.
About the Info Window
Learn more about each setting in the Get operator's Info window:
Setting |
Description |
---|---|
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. |
Path |
This is the reference key leading to the data you want to retrieve. For example, [0] references the first row in your data set. And the key [0].name references the column labeled name in that first row. Or, you can use this field to reference a global variable key. |
Adding a Get Operator
For this example, create a Data Table that holds a list of countries and their capitals. Then, you'll set up a Data Workflow with two Get operators. One Get operator will retrieve an entire row of data, and the other will retrieve a single value.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
First, add a Data Table component to hold some sample data.
1. | In the Module Builder, drag and drop a ![]() |
3. | To the left of the component's configuration window, click Data. |
4. | In the data table, enter the following: |
A | B | |
---|---|---|
1 |
country |
capital |
2 |
Afghanistan |
Kabul |
3 |
Albania |
Tirana |
4 |
Algeria |
Algiers |
5 |
Cambodia |
Phnom Penh |
6 |
Czech Republic |
Prague |
7 |
Andorra |
Andorra la Vella |
8 |
Austria |
Vienna |
5. | Click Save & Close. |
Configure the Hidden Component
Next, add a Hidden component to store the output from the Get operator retrieving a full row of data.
1. | Drag and drop a Hidden component onto your canvas, placing it below your ![]() |
3. | Click Save & Close. |
Configure the Text Field Component
Configure a Text Field component to hold the output for the Get operator retrieving a single value. That way, you can display the value in Express View 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..
1. | Drag and drop a Text Field component onto your canvas, placing it below your Hidden component. |
2. | In the Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter fifthCountry. |
3. | In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. field, enter Fifth Country. |
4. | Set Disable User Input to (ON). |
5. | Click Save & Close. |
Configure the Data Workflow Component
Next, add a Data Workflow component. Use an Input operator to retrieve the data from the Data Table component. Then, add two Get operators—one to retrieve the first row of your data set and one to retrieve a single cell. Lastly, you'll add two Output operators to output your results.
1. | Drag and drop a Data Workflow component onto your canvas, placing it between the ![]() |
2. | In the Canvas Label Text and Property Name fields, enter dwfGet. |
Configure the Input Operator
1. | Drag and drop an Input operator onto your Data Workflow canvas. |
2. | Configure the Input operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Input |
Component |
dtCountries |
Required |
Yes |
Source |
Default |
Configure the Get First Row Get Operator
1. | Drag and drop a Get operator onto your Data Workflow canvas. |
2. | Configure the Get operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Get |
Label |
Get First Row |
Path |
[0] |
3. | Connect the output port (right) of the dtCountries Input operator to the input port (left) of the Get First Row Get operator. |
Configure the firstRow Output Operator
1. | Drag and drop an Output operator onto your Data Workflow canvas. |
2. | Configure the Output operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Output |
Component |
firstRow |
Action |
value |
3. | Connect the output port (right) of the Get First Row Get operator to the input port (left) of the firstRow Output operator. |
Configure the Get Fifth Country Get Operator
1. | Drag and drop a second Get operator onto your Data Workflow canvas. |
2. | Configure the Get operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Get |
Label |
Get Fifth Country |
Path |
[4].country |
Remember, [0] is the first row. So, [4] pulls the fifth row.
3. | Connect the output port (right) of the dtCountries Input operator to the input port (left) of the Get Fifth Country Get operator. |
Configure the fifthCountry Output Operator
1. | Drag and drop a second Output operator onto your Data Workflow canvas. |
2. | Configure the Output operator's Info window as follows: |
Setting |
Value |
---|---|
Category |
Output |
Component |
fifthCountry |
Action |
value |
3. | Connect the output port (right) of the Get Fifth Country Get operator to the input port (left) of the fifthCountry Output operator. |
4. | Click Save. |
5. | Save your module. |
Your completed module looks like the following:
Preview your module in Express View 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.. You'll see the Fifth Country Text Field populates with Czech Republic. This is the country from the fifth row of your data table, returned by your Get Fifth Country Get operator. Open the DevTools Console The DevTools Console helps you securely store, build, test, and deploy your software. and run the Angular command 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. Expand the ▶ data: tab to see the first row of data returned by your Get First Row Get operator.