Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Referencing a case type

Updated on May 11, 2022

Build transparent and automatic relationships between case types by creating case references. When you reference a case type, you can pass data about one case type to another case type, and you can clearly view connections between case types and their instances at run time. You also save time and take advantage of low-code tools because you can view relations between case types without creating complex report definitions.

For example, you can reference a Manage account case type from an Offer opportunity case type. As a result, you can quickly view offered opportunities that are related to a managed account. You can also create a UI to display the offered opportunities at run time from the view of a case for managing an account.

When you reference a case type, the system automatically creates a field of the query type in the data model of the referenced case type. For example, if you reference the Manage account case type in the Offer opportunity case type, the system automatically adds a query field in the data model of the Manage account case type. As a result, you can clearly analyze connections between case types.

To adjust the processing and display of case references at run time, you can decide whether a case references other cases as a single object or a list of objects. For example, you can reference only one run-time instance of a Manage account case type from a Offer opportunity case type. Then, an application displays only one case ID. You can also connect multiple instances of the Offer opportunity case type to the same instance of the Manage account case type, and configure an application to display a table with multiple case IDs.

Note: Case references work most efficiently in Cosmos React applications.

You can create case type references in the following elements of your application:

  1. Navigate to a place where you want to add a field:
    ChoicesActions
    Add a field to a case type data model
    1. In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
    2. On the Data model tab, click Add field.
    Add a field to a form in a view of a non-Cosmos React application
    1. In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
    2. On the Workflow tab, in the Case life cycle section, click an assignment or an approval step.
    3. In the Step properties pane, click Configure view.
    4. In the dialog box, on the Fields tab, click Add field.
    Add a field to an application visual data model
    1. In the navigation pane of App Studio, click Data.
    2. In the Data model section, click View.
    3. In the data model, click a data object for which you want to create a data field.
    4. In the list of fields, click Create new field.
    Add a field to a data object
    1. In the navigation pane of App Studio, click Data.
    2. In the Data objects column, click the data object that you want to open.
    3. On the Data model tab, click Add field.
  2. In the field configuration dialog box, for the Field name parameter, enter a unique label for the field.
  3. In the Type list, select Case reference.
  4. In the Case type list, select a case type that you want to reference.
  5. In the Options list, define how you want to retrieve and display data from the source case type:
    • To create one entry for data from the source, select Single record.

      For example, you can connect an Opportunity case type to one instance of the Manage account case type. At run time, an application displays only one field for the referenced data.

    • To create a list of separate entries for data from the source, select List of records.

      For example, you can connect a Manage account case type to multiple instances of an Opportunity case type. At run time, an application displays a grid table with sourced information.

  6. Optional: To copy the referenced data into a case at run time, expand the Advanced section, and then select the Reference data is copied to the case check box.
    Copying data creates a snapshot of the referenced data and preserves the data in the target unchanged if data in the source changes.
  7. Optional: To provide another data page to source data, expand the Advanced section, and then, in the Data page field, enter the data page that you want to use.
    For example: You can provide a data page that filters case types by status to display only cases with an Active status at run time.
  8. Optional: To change the unique identifier of a referenced case type, expand the Parameters section, and then configure how an application sources the new value:
    • To manually provide a new value, in the pyID list, select Constant, and then, in the text field, enter a new unique identifier for the case type.
    • To source the value from a field in the current case type, in the pyID list, select Field, and then, in the list, select a field that stores the value that you want to use as the unique identifier.
    • To source the value from a field in the referenced case type, in the pyID list, select Field in target, and then, in the list, select a field that stores the value that you want to use as the unique identifier.
    You can reference a unique identifier, which is also a pyID parameter, in various elements in your application, such as reports.
  9. Save your data field:
    • To save the field and instantly define another field, click Submit & add another.
    • To save your field and return to the configuration view, click Submit.
Result: The system creates a field of a query type in the data model of the referenced case type, as shown in the following figure:
Case reference field configuration
Creating a case reference and its effect in a data model.
For example: The following figure shows an instance of a Manage account case type at run time with the Opportunities section that an application sources by using a case reference with a list of records configuration. At run time, the system automatically populates the fields with values that are provided by an instance of the referenced case type.
Case type reference at run time
Run-time presentation of referencing a case type.
What to do next:
  • Add a field for selecting a case to reference to the view your case type. For example, in an Offer opportunity case type, add a field to select an instance of a Manage account case. For more information, see Adding single-value fields to forms.
  • Add a field that displays referenced case types, and then configure the display as a table. For example, in the Manage account case type, add a field to display instances of Offer opportunity case type. For more information, see .

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us