Read-Only Grid Component

Eager to get started with the read-only grid? Check out the Grid Tutorial for the fastest and easiest way to create a read-only grid.

Read-Only Grid

Function: a!gridField()

Displays a read-only grid where you can display data as rich text, links, images, buttons, tags, record actions, and progress bars. The grid supports selecting, sorting, and paging. The read-only grid is designed to be fast and easy to setup from Design Mode, and features a natural integration with the Query Editor.


Note: not all parameters are immediately available in Design Mode; some display only after enabling others. For example, after selecting Selectable, other selection-related parameters will be available.

Name Keyword Types Description




Text to display as the grid label.

Label Position



Determines where the label appears. Valid values:

  • "ABOVE" (default) Displays the label above the component.
  • "ADJACENT" Displays the label to the left of the component.
  • "COLLAPSED" Hides the label. The label will still be read by screen readers; see accessibility considerations for more information.
  • "JUSTIFIED" Aligns the label alongside the component starting at the edge of the page.




Supplemental text about this grid.

Help Tooltip



Displays a help icon with the specified text as a tooltip. The tooltip displays a maximum of 500 characters. The help icon does not show when the label position is "COLLAPSED".

Empty Grid Message



Text to display in the grid when no data is available. Default is "No items available".



List of Dictionary, DataSubset, or PortalReportDataSubset

The data to display in the grid. Can be configured using a!queryEntity() with pagingInfo set as fv!pagingInfo to have the grid automatically manage paging. The function a!queryProcessAnalytics(), a Data Subset, a list of Dictionary, or an array of data can also be used. When using a query that returns a datasubset, you must pass the total count (fetchTotalCount: true on the query).



List of a!gridColumn()

The columns to display in the grid, configured using a!gridColumn().

Rows to Display Per Page


Number (Integer)

The maximum number of rows to display at a time. Default: 10

Initial Sorts


List of SortInfo

Sorts applied to the grid upon initial load only. Each sort is applied in the order listed. The first sort in the list will display an active-sort arrow indicator (either up or down for ascending or descending) in its corresponding grid column (if applicable).

Secondary Sorts


List of SortInfo

Sorts applied to the grid after every user interaction. If the user activates a sort on a column, these sorts will be applied to the other columns in the order they're listed. For example, adding a secondary sort on Month will keep them in order when the user sorts on Year. Secondary sorts do not display an active-sort indicator.

Paging Save Into


List of Save

One or more variables that are updated only when user invokes a paging action on the grid. You can reference the current paging of the grid using fv!pagingInfo.




Determines if grid rows are selectable. When selection style is "CHECKBOX" (default), the selection column is displayed. Default: false.

Selection Style



Determines the style when a row is selected. Valid values: "CHECKBOX" (default), "ROW_HIGHLIGHT".

Selection Value


Text Array or Integer Array

Identifiers of the rows that should appear as selected. Can be set to have rows be pre-selected for the user. Supported types: Text Array and Integer Array.

Save Selection To


List of Save

One or more variables that are updated with the selected identifiers when the user changes selections. Use a!save() to save a modified or alternative value to a variable. You can reference the rows selected and deselected in the most recent user interaction (not all selected or deselected rows) using fv!selectedRows and fv!deselectedRows respectively.

Selection required



Determines if a selection is required to submit the form. Default: false.

Selection Required Message



Custom message to display when a selection is required and not provided.

Disable Row Selection



'Enter an expression that evaluates to true or false. The expression is run for each row. When the expression evaluates to true, that row is disabled. You can reference fields from the source using fv!row.[fieldName]. For example, you can disableRowSelectionWhen: isnull(fv!row.status). Default: false. You can also reference the identifier of the row using fv!identifier`.'



List of Variant

Validation errors to display below the grid when the data is invalid, configured using a!validationMessage(). You can reference the current page of data using fv!currentPage.

Validation Group



When present, this field is only validated when a button in the same validation group is pressed.




Determines whether the component is displayed on the interface. When set to false, the component is hidden and is not evaluated. Default: true.




Determines the spacing within grid cells. Valid values: "STANDARD" (default), "DENSE".




Determines height of the grid. Valid values: "SHORT", "MEDIUM", "TALL", "AUTO" (default). When it is set to SHORT, MEDIUM, or TALL, the header is frozen.

Border Style



Determines the style of the grid border. Valid values: "STANDARD" (default), "LIGHT".

Shade alternate rows



Determines whether alternate rows are shaded. Default: true.

Row Header


Number (Integer)

Index of the column to be used as the row header. Screen readers will announce the value in each row header when navigating to other cells within that row. Used only for accessibility; produces no visible change.

Accessibility Text



Additional text to be announced by screen readers. Used only for accessibility; produces no visible change.

Display Notes

  • To reduce clutter on smaller grids, the following happens:
    • No paging controls are displayed when all rows are on one page.
    • Paging controls to jump to the first or last page are not displayed when a grid has less than 3 pages.
  • If the Value for a column is empty or null, the grid still renders the column with just the label.
  • For columns using the "AUTO" width, each column's width is determined by the length of the longest value in that column.
  • Paging and sorting do not function and images do not render when this component is used offline.
  • Grid heights behave as a fixed height on web but a maximum height on mobile.
  • The Selection Style (selectionStyle) of ROW_HIGHLIGHT does not have any visual indicator when selection is disabled through the Disable Row Selection (disablerowselectionwhen) parameter.

Configuration Notes

  • If you are managing your own paging, you cannot pass a datasubset whose paging configuration uses a batchSize of -1.
  • See also: a!queryEntity() Function.
  • For accessibility purposes, every grid should have a row header configured. The first column containing text is usually the correct choice for row header. See the UX Design Guide for more information.
  • When entering a query in the Data parameter (either directly, or indirectly from a rule reference), the query must return the total count (fetchTotalCount: true).

Query Editor Notes

When you use the query editor in Design Mode to generate a query for the grid, from the Data parameter, the grid will automatically configure certain elements for you.

  • The value set for the query's batchSize (Rows Per Page) will be used for the grid's Page Size (pageSize) parameter.
  • The value set for the query's sortInfo will be used for the grid's Initial Sorts (initialSorts) parameter.

Design Mode Notes

  • The grid cannot use a query whose paging info contains a batchSize of -1 from Design Mode.
  • When setting up a grid, if you populate the Data parameter from Design Mode, and let the grid manage the paging, the grid will automatically generate an initial set of columns in the order they appear.
    • Note that automatic, column generation doesn't occur when the source data is a local variable.
  • After initial columns have been generated, if you add fields to the source data, new, matching columns will be added to the grid. To trigger this behavior when using an indirect data source (from an expression or a rule), from the Data parameter, click Edit then OK.
    • Additional columns will not be automatically generated if you have changed the arrangement of existing columns.
    • Columns will not be removed if the corresponding fields are removed from the source data.
  • The initial values for automatically-generated columns are:
    • label: fv!row.<fieldname>, where the field name is converted to title case.
      • If the field name is in camel case, it will be split and converted to title case.
      • If the field name is too long, it will be truncated with elipses (...).
    • value: fv!row.<fieldname>
    • sortField: <fieldname>
    • If the data type for the column value is numerical or date-based, then it will set align: "END".
    • If the data type for the column value is a decimal, then it will be wrapped in the fixed() function to two decimal places. Ex. value: fixed(fv!row.cost, 2).


You can find example configurations of the grid at Configuring the Read-Only Grid.

Common Questions

Should I change my existing grid to a read-only grid?

If you're using an editable grid as a read-only grid, because you didn't have access to the rich-text component, then you could see a performance improvement changing that editable grid to a read-only grid.

If you're using a paging grid (a!gridField_19r1), we recommend you upgrade to the read-only grid. The advantages are:

  • Better UX (column widths, header tooltips, rich text).
  • Native handling of common data errors when you use fv!pagingInfo.
  • Deterministic sorting (from secondarySorts).
  • Helpful function variables for passing selected row data (fv!selectedRows, fv!deselectedRows) that can be used to avoid requerying data.

How do I convert my paging grid to a read-only grid?

The easiest way to convert your paging grid to a read-only grid would be to recreate the grid. In most cases, this will be the fastest way. Since the read-only grid is a new paradigm, converting a paging grid to a read-only grid isn't just changing a few parameters; a lot of what used to exist outside of the grid to support it just isn't necessary anymore—a!pagingInfo(), a!gridSelection(). Trying to convert your existing grids by manipulating the underlying expression will likely result in a lot of unnecessary, leftover content, and possibly some unusual behaviors that result from trying to preserve your existing paging information.

The part that can be reused is any query that provides the data for your grid. If you stored the query in a local variable, you can place that query expression directly into the Data parameter of the grid, or into an expression rule (if you're reusing it), and update the paging info to use the grid's fv!pagingInfo instead.

Do I have to use a!localVariables with the new grid?

No, you don't. The new grid doesn't require local variables since you can pass the data directly to the grid and it will automatically refresh on data change; you don't need to use a!localVariables(), load(), or with().

The only two cases where you will need to use local variables are (1) if you want to manually manage your paging, or (2) if you want to take advantage of additional capabilities of a!refreshVariable, such as configuring a refresh interval. For either of these cases, you should define a!localVariables() outside of the grid's data parameter and then pass in the defined local variable to data.

See Also

Configuring the Read-Only Grid.

UX Design Guide: Grids: Includes UX best practices for designing grids.

Grid Tutorial: Fast walkthrough that covers creating a grid, embedding a query, enabling selection, and formatting columns.

The following patterns include usage of the Read-Only Grid Component.

Open in Github Built: Fri, Jun 03, 2022 (01:08:29 PM)

On This Page