The Hidden component component acts as a holding place for any data type or data structure in your application. This data can include numbers, objects, arrays, or arrays of objects. This flexibility makes the Hidden component perfect for storing data.
A few scenarios lend themselves particularly well to using Hidden components. You can use them to support interactions with logic and data-type components: Calculators, Decisions, Initializers, and Data Workflows. For example, saving the id or exportId values of a ViewGrid row to a Hidden component. After saving, you can reference that row using a logic component. After saving this value, you can reference the module ID in a Plug-In component's Get Submissions call. To avoid hard-coding the module ID in a Plug-In, you can reference the Hidden component instead. Hidden components offer a simplified approach to setting the default value. Other components (for example, Text Field components) need an Initializer component to work.
It's important to note that you should always use Hidden components when storing non-primitive data types, like arrays and objects. Using other components to store non-primitives, like an array in a Text Field component, can lead to unpredictable and non-deterministic behavior.
After completing this article, you’ll know when to use a Hidden component, how to configure its settings, and how to use it in an Unqork application.
About the Configuration Window
TIP To learn more about general component settings and those that display when a component is associated with Data Models, view our General Component Settings article.
Display Panel
Field Text
Setting
Description
Label Text
A component’s 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 Module Builder.
User-friendly labels make your module more accessible. Keep labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.
Data Panel
Data Storage
Setting
Description
Store Data in Database
The Store Data in Database setting affects how data persists through your application. When set to (ON), Unqork stores values entered into the field to the database (server-side submission). This occurs in three scenarios:
Navigating between Panels in a Navigation component. On navigation between pages (Panels), the component’s value saves to the database.
Triggering a module save event using a Button component with an Action Type of Save.
Navigating between screens of a workflow. On navigation between screens, the component’s value saves to the database.
NOTE By default, workflows persist data from all fields in the client-side submission when navigating between screens. However, only values from fields with Store Data in Database enabled store in the server-side submission.
Set the toggle to (OFF) when you don’t want to store the values from this field in the database.
NOTE When using a Plug-In to remote execute a module, ensure data moving between modules is persistent. You can optionally enable Store Data in Database for components in the source module. But any components in the API module whose values are included in an API response must have Store Data in Database enabled. When a component’s data is not persistent, the data isn't included in an API call's response. So, Plug-Ins or external services requesting data from the API module can't receive non-persistent data in the response. To learn more about Store Data in Database in the context of API modules, see the panelResponse Panel section of the API Specification Snippet article in our In-Product Help.
TIP Store Data in Database also affects what data is tracked using Unqork’s built-in tracker. When the Enable Tracker and Track Value toggles are set to (ON) in Module Settings, only values from fields with Store Data in Database enabled are tracked.
Default Value
Enter a value to store in the Hidden component by default. Using a Default Value is a simple way to define and store data, which you can then reference in another component. For example, defining a specific module ID to reference in a Plug-In’s Get Submissions call. You can still pass values into the Hidden component to overwrite the Default Value.
NOTE The Hidden component can only store Default Values as strings.
Validation Panel
Input Required
Setting
Description
Required
When set to (ON), the end user must enter a value in the component's visible fields. Set the toggle to (OFF) when an entry is optional.
By default, the Required toggle is set to (OFF).
Adding a Hidden Component
Let's add a Hidden component as the output of a Data Workflow. These instructions assume that you have an open module saved with a title.
1.
In the Module Builder, drag and drop a Hidden component onto your canvas.
Now that you've configured your Hidden component, use it as an output for your Data Workflow. For more information, see the Data Workflow component article in our Documentation Hub.
The Hidden component component acts as a holding place for any data type or data structure in your application. This data can include numbers, objects, arrays, or arrays of objects. This flexibility makes the Hidden component perfect for storing data.
A few scenarios lend themselves particularly well to using Hidden components. You can use them to support interactions with logic and data-type components: Calculators, Decisions, Initializers, and Data Workflows. For example, saving the id or exportId values of a ViewGrid row to a Hidden component. After saving, you can reference that row using a logic component. After saving this value, you can reference the module ID in a Plug-In component's Get Submissions call. To avoid hard-coding the module ID in a Plug-In, you can reference the Hidden component instead. Hidden components offer a simplified approach to setting the default value. Other components (for example, Text Field components) need an Initializer component to work.
It's important to note that you should always use Hidden components when storing non-primitive data types, like arrays and objects. Using other components to store non-primitives, like an array in a Text Field component, can lead to unpredictable and non-deterministic behavior.
After completing this article, you’ll know when to use a Hidden component, how to configure its settings, and how to use it in an Unqork application.
About the Configuration Window
TIP To learn more about general component settings and those that display when a component is associated with Data Models, view our General Component Settings article.
Display Panel
Field Text
Setting
Description
Canvas Label Text
A component’s 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 Module Builder.
User-friendly labels make your module more accessible. Keep labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.
Data Panel
Data Storage
Setting
Description
Store Data in Database
The Store Data in Database setting affects how data persists through your application. When set to (ON), Unqork stores values entered into the field to the database (server-side submission). This occurs in three scenarios:
Navigating between Panels in a Navigation component. On navigation between pages (Panels), the component’s value saves to the database.
Triggering a module save event using a Button component with an Action Type of Save.
Navigating between screens of a workflow. On navigation between screens, the component’s value saves to the database.
NOTE By default, workflows persist data from all fields in the client-side submission when navigating between screens. However, only values from fields with Store Data in Database enabled store in the server-side submission.
Set the toggle to (OFF) when you don’t want to store the values from this field in the database.
NOTE When using a Plug-In to remote execute a module, ensure data moving between modules is persistent. You can optionally enable Store Data in Database for components in the source module. But any components in the API module whose values are included in an API response must have Store Data in Database enabled. When a component’s data is not persistent, the data isn't included in an API call's response. So, Plug-Ins or external services requesting data from the API module can't receive non-persistent data in the response. To learn more about Store Data in Database in the context of API modules, see the panelResponse Panel section of the API Specification Snippet article in our In-Product Help.
TIP Store Data in Database also affects what data is tracked using Unqork’s built-in tracker. When the Enable Tracker and Track Value toggles are set to (ON) in Module Settings, only values from fields with Store Data in Database enabled are tracked.
Default Value
Enter a value to store in the Hidden component by default. Using a Default Value is a simple way to define and store data, which you can then reference in another component. For example, defining a specific module ID to reference in a Plug-In’s Get Submissions call. You can still pass values into the Hidden component to overwrite the Default Value.
NOTE The Hidden component can only store Default Values as strings.
Validation Panel
Input Required
Setting
Description
Required
When set to (ON), the end user must enter a value in the component's visible fields. Set the toggle to (OFF) when an entry is optional.
By default, the Required toggle is set to (OFF).
Adding a Hidden Component
Let's add a Hidden component as the output of a Data Workflow. These instructions assume that you have an open module saved with a title.
1.
In the Module Builder, drag and drop a Hidden component onto your canvas.
Now that you've configured your Hidden component, use it as an output for your Data Workflow. For more information, see the Data Workflow component article in our Documentation Hub.