Referencing data from another data type
Create reusable data for your application and build easy to maintain forms by using a data reference.
A data reference is a field in your data model that is linked to a data type in your application. When you add a data reference to a form, it prompts users to select a data record, or instance of the data type. For example, you can reference the Vehicle data type on an accident claim form to display a list of car models.
Note: Unlike fields and forms that are specific to a case type, data types are accessible
throughout your application. You can create data references in different case types that are
linked to the same data type.
You can reference a data type in the following ways:
- Adding a new field to a form and setting the field type to Data reference.
- Selecting a data type in the Reuse fields panel. This technique automatically creates and configures a data-reference field.
- Selecting an existing data reference in the Reuse fields panel.
- Adding a data reference field to a data type or case type.
- Access the data model for a data type or a case type, based on how the field will be used in your application.
- Click + Add field.
- In the Name column, enter a label for the field. You can modify the identifier that is automatically generated in the ID column.
- In the Type column, select Data reference from the list of options.
-
In the Options column, perform any of the following
actions:
- To select an existing data type, in the autocomplete field, enter the name of the data type.
- To create a data type, click New.
- Click the Configure field icon in the row of the data reference.
- In the Data Page field, select a data page that is populated with data records.
- Click Submit.
- If you are updating the data model for a case type, click Save. There is no save option for data types in Dev Studio.