Control - Relationship
There are multiple worksheets for different business data in an application. There may be some correlation between different business objects.
Take two worksheets, Customerand Contact, as an example, they store data of two types of business objects respectively. However, there may be multiple contacts in a customer company, and a contact may be an individual or may belong to a company.
If you manage these two types of data independently, you will not only need to enter data repeatedly, but also inconvenient to view the data.
If you select the control [Relationship], when you create a contact record, you can associate it to an existing customer record in the worksheet Customer, without entering again.
Effect
Associate multiple records (multiple contacts for one customer)
Associate one record (one contact for one customer)
Configuration
Scenario: Associate the worksheet Customerwith the fields in the worksheet Contact
1. Add Control
2. Associate
Select the associated worksheet.
3. Set Field
A: Field Name
Set the name to display in current worksheet
B: Associated Worksheet
Click to view the setting page of the associated worksheet.
C: Associated Quantity
Single row: Associate one record, for example, if a contact can only belong to one company, you can check this.
Multiple row: Associate multiple records, for example, if there are more than one contact for one company, you can check this.
In the above scenario, a customer company can be associated with multiple contacts, so select [Multiple row], and conversely, to select [Single row].
More details about the three types of associations
D: Display Mode
You can set how to display the associated records.
For multiple rows: list, card, drop-down box Up to 50 associated records for card or drop-down box; no limit for list.
For single row: card, drop-down box
E: Display Fields
You can choose which fields in the associated worksheet are displayed.
List: Multiple columns
Card: Up to 3 columns
Drop-down box: Fields can be displayed when selecting records, and only the title field can be displayed after selecting.
F: Cover
- An attachment to the associated record can be displayed in the record card, but it must be a file or image that can be previewed.
- If you select drop-down box or list, the cover can be displayed on Mobile Terminal, but not on PC.
Effect:
G: Default Value
There are three ways to set the default value.
Fixed value: Each time you create a record, it is associated with the fixed records.
Other field values: Automatically reference the records associated with other associated fields.
Query worksheet: Get related records by querying the worksheet and automatically associate them.
More details about setting default values
H: Set Associated Records
The following figure shows the page to add associated records.
Allow selection of existing records:
If checked, you can select existing records directly from the worksheet Contact to associate. When associating the existing records, you can set filtering criteria to select from the filtered records. How to filter records
If it is not checked, the button of [Associate Existing Records] will be hidden. You cannot select existing records from Contact.
Allow to cancel existing association:
For records that are already associated, you can check [Allow to cancel existing association]. If it is unchecked, the button will be hidden.
Allow to view records:
If it is not checked, then you cannot open the detail page of the associated record. If you choose to display associated records in multiple lists, quick edit is not available.
I: Query Settings
When associating records, you can search or filter the target record.
Search
You can only search one field, checking [Fuzzy search] or [Accurate search].
Filter
You can add multiple filter fields.
J: Associate View
If you choose to associate a view, when you add an associated record, only the records in the view are displayed. The sorting of associated records is also based on the sorting in the view, and opening the record in this case, there will show the custom actions and hidden fields in this view on the details page.
Note that even if the associated record has changed and is no longer in the selected view, the association still exists.
K: View by User Permissions
If checked, the records and fields that are visible to the user are displayed based on the permissions the user is configured with.
- If there are records that are not visible to the user, there is “X records are hidden”.
- If there is a field that is not visible to the user, the field is grayed out and blank.
The following are other property settings
L: Bi-directional Association
A worksheet that stores basic data may be associated with several other worksheets. But it is not necessary to show the associations with other worksheets in the basic worksheet.
For example, Customer is associated with Contact, which is a one-way association by default. In this case there are no associated fields to be automatically displayed in Contact.
Therefore, if you need to display the associated fields in Contact, you can check [Bi-directional association] and set further.
In Contact, only 1 record in Customer can be associated, so select [Single row] here.
Cancel Bi-directional Association: You cannot cancel the bi-directional association directly in the current worksheet. If you do not want to display this worksheet in the associated worksheet, go to the configuration page of the associated worksheet and delete the corresponding associated fields.
M: Restrict Mobile Input
Disable manual input
If checked, you can only add the associated record by scanning the code on Mobile Terminal, and cannot add manually on PC or Mobile Terminal.
Disable the photo album
If checked, you can only take photos and upload them.
Get input before displaying the form
If checked, when adding a new record in APP, you need to take a picture and upload it first, and then fill in the other fields.
Submit the form directly after obtaining
If checked, when adding a new record in APP, the record is automatically submitted once the photo is taken and uploaded.
4. Add Associated Records
Create: Create a record in the associated worksheet and automatically associate it with the current record
Select: Select an existing record from the associated worksheet to associate
5. Delete Associated Records
Only the relationship between two records is deleted, not the records.
6. Adjust Column Width
On the record details page, drag and drop to adjust the column width and save it. If Admin adjusts it, it will be updated on everyone’s page.
7. Column Display
It is possible to display the fields in this record and the associated fields in two separate areas. You need to select [Multiple row] and choose to display in a list when associating records.
Have questions about this article? Send us feedback