Grid Initialized via OData Query

You use the Grid component for a read-only grid that displays data retrieved from the CampusNexus CRM or Anthology Student database. You will need to define an OData query to select the data to be retrieved. You then configure the grid to show specific columns and perform sorting, paging, and filtering operations via its built-in property settings.

alert The grid populated by an OData query must be a read-only grid. Do not use OData queries for editable grids.

Control Property Settings

Grid properties

Rendered Component

Read-only Grid

This example shows the settings for a Grid Initialized via OData Query that displays relationship addresses for a specific student. The LookupUser and GetEntity<StudentEntity> activities in the workflow supply the Student Id value. The OData query populates the rendered table.

Workflow Argument

studentRelationshipAddressEntity argument

Column Specifications for a Grid with OData Query

Column properties

alert Unexpected results and additional columns may be seen when the grid is rendered with no Columns specified.
Grid Property: OData Query

The grid property OData Query supplies the data for a read-only grid. The Select statement for the OData Query must include all Property Names specified in Column popup editor. Note in example below how FirstName, LastName, and City are included in the Select statement and in the Column settings. The Property Name fields must match the entity field names exactly and are case sensitive.

Example

StudentRelationshipAddresses?$select=FirstName,LastName,City,PostalCode,CreatedDateTime&$expand=AddressType($select=Name)&$filter=StudentId eq {{vm.models.studentEntity.Id}}

alert Important
  The OData query must contain a $select option to retrieve the field names (FirstName, LastName, etc.). If column properties are specified, the Property Name field in the column editor must match the field name in the OData query.

When an OData query contains an $expand option (e.g., $expand=AddressType($select=Name) to retrieve properties within a node, the Property Name field in the column editor must use the dot notation, e.g., AddressType.Name.