Skip to main content

Foreign


About: The control [Foreign] is an extension of the control [Relationship]. It helps to refer to fields in other worksheets and save them in the records of the current worksheet and update them synchronously, or display them only when the user opens the record.

Scenario: The worksheet Order is associated with the worksheetContact, and you want to display the fields [Telephone] and [Position] of Contact directly in Order.

The control [Foreign] relies on the control [Relationship]. You need to learn more about [Relationship] first.

How to set the control [Foreign]

1. Add the control [Foreign]

On the form editing page, select the control [Foreign] in the left area and drag it to the middle.

2. Set the target field

For example, if you want to display the field [Telephone] of Contactin the current worksheet, as shown below, select [Contact] for [Relationship], and select [Telephone] for [Display fields] in the right setting area.

A: Edit the name of the field in the current worksheet.

B: Select Contact.

C: Select [Telephone]

The same, you can set to display the field [Position] of Contact in the current worksheet, and save it.

Effect

Unable to select the associated record

As shown in the figure below, when setting the control [Foreign], you cannot select the associated field?

Please add a control [Relationship] to the current worksheet and set it, checking [Single row] for [Associated quantity].

3. Set the type

There are two types, which are [Display Only] and [Storage Data].

  • Display Only:

    If checked, the associated field will be displayed only in the view or on the record detail page.

    Since the data is not saved, it is not available for searching, filtering, sorting, and statistics, nor is it available in the controls [Formula] and [Concat].

  • Storage Data:

    If checked, the associated field will be a field of the current worksheet and updated in real time. The data can be saved, and is available for searching, filtering, sorting, and statistics, as well as in the controls [Formula] and [Concat].

Notes for synchronizing fields

    1. There is a delay in synchronizing data. It is not real-time synchronization.
    1. If the field changes, up to 1000 associated records in the associated worksheet can be updated accordingly.
    • For example, there are 1500 orders related to Ada. The filed [Telephone] in Contact is displayed in the worksheet Order via the control [Foreign]. If Ada’s phone number changes in Contact, the phone number in up to 1000 orders can be updated and that in the other 500 orders will not be changed in real time.

Difference between [Display Only] and [Storage Data]

  • If the associated fields are not involved in searching or filtering, you can select [Display Only]. It can not only show the latest data, but also reduce the stress of data synchronization.
  • If the number of fields to be synchronized is less than 1000, you can select [Storage Data]. It can maintain the full capacity of the fields.

Difference between [Dynamic Default Value] and [Foreign]

Both the dynamic default value and the foreign control can help display the value of the field in the associated record, but the difference is that the foreign control is related to the associated record in real time and update automatically once the associated record changes. Dynamic default value, on the other hand, only helps display the content of the associated record when editing, not in real time.

Example: The unit price of the product is frequently adjusted, and the unit price of the product in Product worksheet is up to date. When you create an order, once the order takes effect, the unit price can no longer be changed. In this case, you cannot choose the foreign control to help display the unit price in an order, otherwise the unit price will change every time you open an order. Instead, you can choose the amount control and set a dynamic default value.

The difference between these two methods is shown in the figure below.


Have questions about this article? Send us feedback