Bidirectional Association

Introduction

Feature(s)

This is how bidirectional association works: Suppose there are two forms, Form A and Form B. Form A is associated with Form B through Select Data so you can retrieve data from Form B. Form B is associated with Form A through Query Data so you can query data from Form A. When you query data from Form A in Form B, you can add Form A data into Form B.

Application Scenario(s)

Bidirectional association can be applied in multiple scenarios such as customer, device, contract, and project management. Take customer management and device management as examples:

1. Customer management scenario.

2. Device management scenario.

Preview

Take Customer Information and Customer Order as examples:

1. When a customer places an order, you can record it in the Customer Order form. When entering data, you can query the customer's basic information from the Customer information form through Select Data. Then the form will access the customer’s information automatically, and you only need to enter the order details and submit the form.

2. When a customer wants to view their membership information, they can query their basic information page in the Customer Information form. Moreover, on the basic information page, you can add new orders directly. When you add new data, the customer's basic information will be filled in the form automatically.

Setting Procedure

Taking the scenarios of member information management and order management as examples:

Designing Forms

1. Create a Customer Information form with the following fields:

Field Name

Field Type

Serial Number

Serial No.

Client Name

Single Line

Phone Number

Single Line

Email Address

Single Line

Order Records

Query Data

2. Create a Customer Order form with the following fields:

Field Name

Field Type

Serial Number

Serial No.

Order Date

Date&Time

Customer

Select Data

Details

SubForm

Product Name

SubForm > Single Select

Number of Products

SubForm > Number

Setting RelatedData

The RelatedData field is used to retrieve basic information from Customer Information to associate customers with orders.

1. Go to Customer Order, select the Client field, and make the following settings in Field Properties:

  • Related Form: Select Customer Information from the drop-down list.
  • Fields Displayed When Selecting: Add Serial Number, Client Name, and Phone Number.

2. Go to Data Filling, and click Set Rules. On the details page, select the fields that need to be called, such as Serial Number, Client Name, and Phone Number, then select Fill into new fields under Handling Field Value. After the settings, click Complete.

Setting RelatedQuery

The RelatedQuery field is used to query the order records in Customer Order and supports adding order data directly.

1. Go to Customer Information, select the Order Records field, and make the following settings in Field Properties:

  • Related Form: Select Customer Order from the drop-down list.
  • Display Fields: Add Serial Number, Order Date, and Other Details (Product Name, Number of Products).

2. Click Add Condition, and add a filter condition: the Client field in Customer Order equals Current Data. Then click OK.

3. To query multiple data, you can tick Multiple in Show Records. To allow members to add new records, you can tick Create records to related form in Related Form Actions.

Note(s)

If you want to allow members to add data from the related form when viewing data in this form, you need to set the permission for members, otherwise the New button will not be available. For example, you need to set permission for members to add data in the Customer Order form.

Was this information helpful?
Yes
NoNo
Need more help? Contact support