(Example) Configure a Relationship in Data Entities
This topic gives an example of how to create relationship between the primary field and a custom field in another entity.
Background and Setup
Video: Build Your First Data Entity
Prerequisites
- AgilePoint NX OnDemand (public cloud), or AgilePoint NX PrivateCloud or AgilePoint NX OnPremises v7.0 or higher.
Good to Know
- For the use case in this example, a business wants to associate a person with an account. The Account Name field in the built-in Account entity is associated with a custom Account Name field in the built-in Person entity. If the Account Name is changed in the Account entity, the Account Name field is updated in the Person entity.
- In the Data tab, the field for which you create a relationship shows the Lookup Data icon next to the field.
Step 1: Create a Relationship
Create a relationship between entities.
How to Start
- Click Data Entities.
- On the Data Entities Home screen, click Entities .
- On the Entities screen, click the Person entity.
- On the Person entity, click the Relationships tab.
- On the Relationships tab, click Add Relationship.
Procedure
- On the New Relationship screen, in the Name field, enter PersonAccountName.
- In the Parent Entity field, select Account.
- In the Parent Primary Field select Account Name.
- In Child Field Display Name field, enter Account Name.
- In the Child Field Name field, enter AccountName.
When you click Child Field Name field, this field completes the value from Child Field Display Name field.
- Click Save.
The Relationship tab shows the relation name PersonAccountName_r.
Step 2 (Optional): Enter Data in the Parent Field to Update in the Child Field
Enter a record in the parent field in a relationship.
Good to Know
- This step is not required to create the relationship. It shows how the relationship updates the data in the child field when data is entered in the parent field.
How to Start
- On the Entities screen, click the Account entity.
- On the Account entity, click the Data tab.
- On the Data tab, click Add Data
Procedure
- On the New Data screen, in the Account Name field, Enter Personal Bank Account.
- Click Save.
The Data tab shows the data Personal Bank Account in the Account Name field.
- On the Data Entities Home screen, click Entities .
- On the Entities screen, click the Person entity.
- On the Person entity, click the Data tab.
- On the Data tab, click Add Data.
- On the Add Data screen, click Lookup Data .
- On Select a Record screen, click Personal Bank Account.
The data you entered in Account entity fields is shown in this screen.
- Click Select.
- The Account Name field shows Personal Bank Account.
- Click Save.
The Data tab shows the Personal Bank Account in Account Name field.