To decrease application development time and costs, reuse data objects across
your application by creating data relationships. When you create a data relationship, you
create connections to all of the fields that you define within one data object or case type.
When you update a data object, the change occurs across all of the elements that you relate to
the data object. As a result, you save time and create an efficient application that is
convenient to maintain.
For example, you create an Address data object that
includes the Name, Last name, Street, and Postal code fields. Next, you create a Billing address
data object and add a data relationship with the Address data object. As a result, you reuse all
the fields that the Address data object includes. You can reuse any of the field types, for
example picklist and boolean.
You can add a data relationship to the following interfaces:
- Your case type data model
- A form in a view for a step in your case type
- Your application data model
-
Navigate to a place where you want to add a data relationship:
Choices |
Actions |
Add a data relationship to a case type data model |
-
In the navigation pane of Dev 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 data relationship to a form in a view |
-
In the navigation pane of Dev Studio, click Case types, and then click the case type that
you want to open.
-
In the Case life cycle section, click an assignment or
an approval step.
-
In the Step properties pane, on the
General tab, click Configure
view.
-
In the dialog box, on the Fields tab, click
Add field.
|
Add a data relationship to an application data model |
-
In the navigation pane of Dev Studio, click Data types.
-
Click the data type that you want to open.
|
-
In the data object configuration dialog box, in the Field name
field, enter a unique name for the field.
For example: Enter Billing address.
-
In the Type list, select Data
relationship.
-
In the Target list, select an object that you want to
reuse:
- To reuse a data object, select .
- To reuse fields from a case type, select .
- To create a new data object, select Define new data object,
provide a unique name for the data object, and then click
OK.
For example: Select .
-
In the Options list, define how you want to reuse fields from
the target:
- To create one entry for all the fields from the target, select Single
record.
- To create a list of separate entries for the fields from the target, select
Multiple records.
- Optional:
To populate the data object with information, select the Load from data
source check box, and then select the data source that defines how your
application loads the information:
Choices |
Actions |
Load a single record from the data source |
-
In the Data view list, select a data view that stores
information that you want to use.
-
In the list of parameters, select the type of field that stores the data that
you want to use.
For example: Select pyID to select a case type.
-
In the drop-down list, select the field that you want to use.
|
Load multiple records from the data source |
In the Data view list, select the data view that you want
to use. At run time, the data view returns values of all the fields that match your
data object.
|
Data views define the data associated with a data object and contain the data object's
connection configuration related to a system of record, separating your application from
the integration with the system of record.
- Optional:
To provide additional information about your data object, 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 data object, in the
Description text box, enter additional details.
-
Save your data object:
- To save the data object and instantly define another data object, click
Add another.
- To save your data object and return to the configuration view, click
Submit.
-
If you add a data relationship to a form, in the Options list,
define the display mode for the data relationship:
- 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 Submit.