Grid Bound to Results of ExecuteODataQuery

You can use the ExecuteODataQuery activity to bind the contents of a grid to the results of the OData query.

In this example, the form sequence contains a form that enables a student to enter the addresses of related persons. The form prompts for the student's first and last name and presents a grid for the entry/display of the relationship addresses.

Form Layout

Grid Property Settings

Grid Property Settings

Grid Columns Property Settings

Grid Columns Properties

Rendered Component

Grid - Relationship Addresses

Workflow Arguments

Workflow Arguments

The workflow for the sequence looks up the student identifier and retrieves the student entity.

The ExecuteOData activity captures the relationship address information and creates a results collection. The OData Query is:

"http://studentwebclientbaseurl/ds/campusnexus/StudentRelationshipAddresses?$select=AddressTypeId,FirstName,LastName,City,StreetAddress,State,PostalCode,Note,AddressBeginDate&$expand=AddressType($select=Name)&$filter=StudentId eq >" & studentId

Workflow with ExecuteODataQuery

The Assign activity writes the Results Collection "addrs.toArray" to the "myAddresses" argument that is defined in the Model property of the grid.

  • The "toArray" attribute in the Assign activity will not be displayed in Intellisense.

  • A manual import of the following namespaces is required:

    • System.Collections.Generic
    • System.Linq

After the Results Collection has been obtained, further workflow activities can be used to manipulate the grid, e.g., save, modify, or delete records.

The Grid component does not support a "Required" validation on the client-side. However, this can still be achieved via workflow logic to verify a value has been set and if not, display a custom validation error.