Genpact Cora Knowledge Center

Support

Use Sub-View Values in Expressions

Overview

To use sub-view values in expressions, you add a reference of the sub-view to the data model (assuming the sub-view is defined in a separate activity).

Procedure

  1. In the data model wizard, click Advanced Options.
  2. In the Data Model Options screen click Add New Import.
  3. Click the three dot button.
  4. In the Imports Explorer screen, select the activity that includes the data model that you want to import.
  5. Click OK.
  6. Edit the imported data model, as necessary.
    • Alias
    • OData Services
  7. Click OK to save the settings.

Result

When you define an expression in the expression wizard, you can view the reference and select any field that you defined in the referenced model.

Sub-View Expression Structure

Below is a sample expression that uses a sub-value.

{Form1}.Query("ref:ns0/Form1")["Field1"]

{Form1}: the activity we are referring to.
Query(“ref:ns0/Form1”): query name Form1 in ref name ns0.
[“Field1”]: the field from which to take the value.