Referencing a data page
Provide data for your case types from integrations in your application by querying a data page. When you source data for your case directly from a data page, you reuse your resources in a transparent and prescriptive way.
For example, you can source information from a data page that has integration with a third-party system to display weather forecast in your application.- Your case type data model. For more information, see Configuring a data model for a case.
- A form in a view for a step in your case type for applications that do not use Cosmos React. For more information, see Adding single-value fields to forms.
- Your application visual data model. For more information, see Viewing an application data model.
- A data model of a data object. For more information, see Viewing the data model for a data object.
By creating a field that references a data page you can reuse information that a data page stores, in interfaces that typically do not allow referencing data pages, for example a condition builder or a decision table. As a result, you promote reuse of information across your application, save application development resources, and provide more flexible software. When you reference a data page, you receive entire content of the data page. If a data has parameters, you can specify the parameters to receive precise information that your business process requires. For example, when you source information about a weather forecast, you can use a location as a parameter so that your application displays the forecast for a selected city.
- Navigate to a place where you want to add a field:
Choices Actions Add a field to a case type data model - In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
- On the Data model tab, click Add field.
Add a field to a form in a view of a non-Cosmos React application - In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
- On the Workflow tab, in the Case life cycle section, click an assignment or an approval step.
- In the Step properties pane, click Configure view.
- In the dialog box, on the Fields tab, click Add field.
Add a field to an application visual data model - In the navigation pane of App Studio, click Data.
- In the Data model section, click View.
- In the data model, click a data object for which you want to create a data field.
- In the list of fields, click Create new field.
Add a field to a data object - In the navigation pane of App Studio, click Data.
- In the Data objects column, click the data object that you want to open.
- On the Data model tab, click Add field.
- In the field configuration dialog box, for the Field name parameter, enter a unique name, for example Weather forecast.
- In the Type list, select Query.
- In the Options list, define how you want to reuse the
fields from the source:
- To create one entry for all the fields from the source, select Single record.
- To create a list of separate entries for the fields from the source, select List of records.
- In the Data page list, select the data page that you want to use as the source.
- If the source data page has parameters, in the Parameters
section, provide information about the parameters of the source data page:
- To provide a static value to search for specific information in the data page, in the pyID list, select Constant, and then in the text field, provide the value that you want to use for searching the data page.
- To select a field in the data page to source information, in the pyID list, select Field, and then, in the list, select the field that you want to use to source data.
- Optional: To provide additional information about your data field, expand and complete the
Advanced section:
- To provide a different ID than the autogenerated ID, in the ID field, enter a new value.
- To provide additional information about the field, in the Description text box, enter additional details.
- 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.
- 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.
- For fields that you add to a form, in the Options list, define
the display mode for the field:
- To indicate that users can optionally complete the fields, select Optional.
- To indicate that users need to provide a value in the fields, select Required.
- To indicate that users can only view the fields, select Read-only.
- Click Save.
Previous topic Embedding data in a case Next topic Validating case data