ViewGrid Component

 

Unqork applications often use dashboards, and configuring a ViewGrid component is the simplest way to create and customize a basic dashboard display. ViewGrid components let you view and manage submission data, work queues, and large data sets. Tailor your Viewgrid component to include any number of columns, buttons, and filters as needed. These features let end-users easily navigate and manage the data in the dashboard.

You can find the ViewGrid component under the Display & Layout group to the left of the Module Builder.

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.

Field Text

A static image displaying the ViewGrid component's Display settings.

Setting Description

Canvas Label Text

Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field.

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.

Default State Options

Setting Description

Hide Field

Displays or hides the component from view. Setting Hide Field to  (ON) hides the component in Express View. Setting it to (OFF) displays the component. The component is always visible in the Module Builder.

By default, Hide Field is set to (OFF).

Formatting

Setting Description

Grid Height

Enter the grid height in pixels. Grid height must be between 250 and 426 pixels.

By default, the grid height is set to 426 pixels. Leave this field blank to keep the default setting.

Page Size

Enter the number of records to display on each page.

By default, the ViewGrid component displays 10 records. Leave this field blank to keep the default setting.

Show Title

Display the Canvas Label Text field's value above the dashboard.

By default, this setting is (OFF).

Show Filters

Display a search box below each column header. End-users use this search box to type a few letters or an entire word to narrow down the results in the dashboard.

The ViewGrid component does not support filtering numeric columns.

By default, this setting is (OFF).

Source Has Pagination

Format the pagination in your ViewGrid component. Select this checkbox if pagination is enabled in the original data source component.

By default, this setting is (OFF).

No Data Text

Enter a message that displays when there's no data to display.By default, this field is empty.

Enable Infinite Scrolling

Allow end-users to scroll through the ViewGrid table without pagination.

By default, this setting is (OFF).

Sort by Columns

Allow end-users to sort the columns of your ViewGrid component. Click the column header once to sort in ascending order (A to Z). Click the column again to sort in descending order (Z to A).

By default, this setting is  (ON).

Always Display Sort Buttons

Add an arrow icon next to the column name. The arrow icon points up (ascending order, A to Z) or down (descending order, Z to A) depending on your sort order. A column displays in ascending order by default when it's clicked.

This feature is only for visual purposes. As long as you select Sort Columns, your end-users can sort columns by clicking on the header.

By default, this setting is (OFF).

 

Create a dashboard that displays some basic submission data from a module. This dashboard does not require action buttons and the data in this configuration is dynamic. So, it updates as end-users submit or edit submissions.

To simplify this configuration, use the following source module: https://training.unqork.io/#/form/648c6514991ac5b474b73b2f/edit.

This is a front-end module where end-users can submit basic information, like name, date of birth, and email address. Set up a Plug-In component to retrieve this information to display on a dashboard.

These instructions assume that you have an open module saved with a title.

Configure the Hidden Component

First, configure a Hidden component to store the module ID of the source module. You'll need to copy the module ID of the source module's as follows: https://training.unqork.io/#/form/648c6514991ac5b474b73b2f/edit.

1. In the Module Builder, drag and drop a iconHidden component onto your canvas.
2. In the Property ID and Canvas Label Text fields, enter moduleId.
3. In the Default Value field, enter 648c6514991ac5b474b73b2f. This is the source module's module ID.
4. Click Save Component.

Configure the Plug-In Component

Configure a Plug-In component to retrieve the submission data from the source module to display in your dashboard.

1. Drag and drop a Plug-In component onto your canvas, placing it below your iconHidden component.
2. In the Property ID and Canvas Label Text fields, enter plugGetSubmissions.
3. Navigate to the component's Data settings.
4. From the Internal Services drop-down, select List Submissions for Dashboard. The /fbu/uapi/system/GetSubmissions URL automatically displays in the Data Source URL field.
5. Next to Inputs, Display, & Outputs table, click Edit.
6. In the Inputs table, enter the following:

 

Property ID

Mapping

1

moduleId

moduleId

2

'firstName,middleName,lastName,email,dateOfBirth'

fields

The first row references the module ID stored in the moduleIdiconHidden component. The second row identifies which source module fields to retrieve and display in the dashboard. The values entered in the Mapping column (moduleId and fields) are native values in Unqork.

A static image displaying the completed Plug-In component configuration with the Inputs table filled out.

7. Click Save Component.

Configure the ViewGrid Component

Next, configure a ViewGrid component to display the submission data on a dashboard.

A static image displaying the completed configuration of the ViewGrid component in the Module Builder.

1. Drag and drop a Dropdown Component Icon ViewGrid component onto the canvas, placing it below your Plug-In component.
2. In the Property ID field, enter gridView.
3. In the Canvas Label Text field, enter View Grid.
4. In the Inputs table, enter the following:

#

Source

Required

1

plugGetSubmissions

Checked Box Icon (checked)

The field IDs are those that exist in the source module. The MomentJS in the Formula column formats the dateOfBirth values as MM/DD/YY.

5. In the Outputs table, enter the following:

#

Source

Mapping

1

submissionId

id

6. In the Display table, enter the following:

#

ID

Formula

Heading CSS Button

1

firstName

 

First Name

 

☐ (unchecked)

2

middleName

 

Middle Name

 

☐ (unchecked)

3

lastName

 

Last Name

 

☐ (unchecked)

4

email

 

Email

 

☐ (unchecked)

5

dateOfBirth

=MOMENT(MOMENT(dateOfBirth), 'format', 'MM/DD/YY')

Date of Birth

 

☐ (unchecked)

 

 

 

 

 

 

7. Navigate to the component's Actions settings.
8. In the Action field, enter null.
9. Click Save Component.

Configure the Initializer Component

Lastly, configure an Initializer component to trigger the Plug-In component.

1. Drag and drop an Radio Button component icon Initializer component onto your canvas, placing it above your iconHidden component.
2. In the Property ID and Canvas Label Text fields, enter initStart.
3. Navigate to the component's Actions settings.
4. From the Trigger Type drop-down, enter or select New Submission.
5. Next to Inputs & Outputs, click Edit.
6. In the Outputs table, enter the following:

#

Source

Type

Value

1

plugGetSubmissions

trigger

GO

7. Click Save Component.
8.  Save  your module.

Preview your module in Express View to see the result. You can also Preview the source module in Express View to add your own values to populate the dashboard. You can find the source module here: https://trainingx.unqork.io/#/display/648c6514991ac5b474b73b2f.

A static image displaying the completed dashboard, populated with data from the source module, in Express View.