Locating keys
Several Omni tags require specific keys, such as aview_name or a field_name. Refer to the following sections for help finding this information in Omni.
view_name and field_name
Theview_name and field_name keys are used in Query field and Query result tags.
To locate the name of a view or field in a query:
- Enter draft mode in a workbook.
- In the tab of the query, open the Results panel.
- In the Fields section, locate a field and click the (caret icon).
main__customers.id. main__customers is the view_name, and id is the field_name.

control_id
Thecontrol_id key is used in Control tags.
To locate the ID of a dashboard control:
- Enter draft mode in a dashboard.
- Locate the control at the top of the dashboard and click the (pencil icon) to open the Edit control panel.
- Locate the ID field at the bottom of the panel. In the example image, the ID is
8v_G12D7.

Query fields
Query field tags are only supported in visualizations, meaning they can’t be used in Markdown dashboard tiles.
Syntax
Accesses query field data
The name of the view that contains the field
The name of the field
The data you want to retrieve, such as the display name of the field. Refer to the following sections for information on what is currently supported.
View name
Returns the display name of the view that contains the specified field.Syntax
Example
Input

Field name
Returns the dispaly name of the field.Syntax
Example
Input

Query results
Query result tags are only supported in visualizations, meaning they can’t be used in Markdown dashboard tiles.
Syntax
Accesses query result data
The type of data point you want to retrieve, such as the value of a field in the first row of query results (
_first). Refer to the following sections for information on what’s currently supported.The name of the view that contains the field
The name of the field. Refer to the Locating keys section for help finding this and the
view_name.Determines the level of interactivity and formatting of the returned value:
value- Interactive; user can click to copy, drill, etc.value_static- Formatting applied, no interactivityraw- No formatting or interactivity
First row value
Returns the first value in the result set for the specified field.Syntax
value_static, which returns a formatted value with no interactivity:
Example
Input

Last row value
Returns the last value in the result set for the specified field.Syntax
value, which allows dashboard users to click and interact with the value. Note the dropdown menu over the value in the example image.
Example
Input

Specific row value
Returns a field value from the specified row (row_number) in the result set.
In Omni, row numbering begins at 0. When you define the variable, subtract one from the number of the actual row you want to reference.
Syntax
11, use 10 as the row_number:
Example
Input

Column total
Returns the total of a specified column in the result set. Requires Column totals to be enabled in the query’s Results options panel.Syntax
Example
Input

Row total
Returns the total of a specified row (row_number) in a pivoted result set. Requires a query with at least one pivot and for Row totals to be enabled in the query’s Results options panel.
In Omni, row numbering begins at 0. When you define the variable, subtract one from the number of the actual row you want to reference.
Syntax
6, use 5 as the row_number:
Example
Grand total
Returns the grand total of a specified column in a pivoted result set. Requires a query with at least one pivot and for Column totals to be enabled in the query’s Results options panel.Syntax
Example
Query and user attribute inspection
Query & user attribute inspection is only supported in Markdown visualizations.
Syntax


Filters
Returns metadata about dashboard filters.Syntax
Accesses filter data
The name of the view that contains the field used in the filter
The name of the field used in the filter. Refer to the Locating keys section for help finding this and the
view_name.The data you want to retrieve, such as
label. Refer to the following section for information on what’s currently supported.Label
Returns the label of the filter. In a dashboard, open the Edit panel for the filter and locate the Label field.Syntax
Example
Input

Summary
Returns the default value (summary) of the filter. In a dashboard, open the Edit panel for the filter and locate the Default value field.Syntax
Example
Input

Value
Returns the current value of the filter.Syntax
Example
Controls
Returns metadata about dashboard controls.Syntax
Accesses control data
The ID of the control, located in the Edit control panel. Refer to the Locating keys section if you need help finding this panel.
The data you want to retrieve, such as
label. Refer to the following section for information on what’s currently supported.Label
Returns the label of the control. In a dashboard, open the Edit panel for the control and locate the Label field.Syntax
Example
Input

Summary
Returns the default value (summary) of the control. In a dashboard, open the Edit panel for the control and locate the Default value field.Syntax
Example
Input

Value
Returns the full database name (view_name.field_name) of the field currently selected in the control.
Syntax
Example
Input

JSON
Returns the URL-encoded JSON of the control.Syntax
Example
Example output
User attribute metadata
Returns information about the user attributes associated with the user currently viewing the dashboard.Accesses Omni metadata
Accesses Omni user attribute data
The reference of the attribute you want to retrieve data for, for example
omni_user_email. The following sections demonstrate some of the Omni system attributes you can use in tags. Refer to the Reference column in Settings > User attributes to locate an attribute’s reference.The data you want to retrieve. Can be either of the following:
label- The display name of the attribute, for exampleOmni user emailvalues- The attribute value set for the user
User email
Returns the email address (omni_user_email value) of the user currently viewing the dashboard.
Syntax
User name
Returns the user name (omni_user_name value) of the user currently viewing the dashboard.
Syntax
User ID
Returns the user ID (omni_user_id value) of the user currently viewing the dashboard.
Syntax
Is org admin?
Returnstrue if the user currently viewing the dashboard is an Organization Admin (omni_is_org_admin value). Otherwise, returns false.
Syntax
Custom user attribute
Returns the value of a custom user attribute of the user currently viewing the dashboard, wherecustom_attribute_reference is the reference of the custom attribute.
Syntax
Example
User groups
Returns a list of user groups (omni_user_groups value) that the user currently viewing the dashboard is a member of.
If the user is a member of more than one group, the output will be a comma-delimited list like Group 1, Group 1.
Syntax