Create hierarchical relationships with single and multiple options fields

Create hierarchical relationships with single and multiple options fields

3 min read
I. Intro
You can reference options in single and multiple options fields in other tables in the base. By referencing options this way, you can create hierarchical relationships between fields in the base. For example, you can configure the fields so that if a user selects a province in the first field, only the cities in that province can be selected in the second field.
If you need to use the same data in multiple tables, you can create a table to serve as the data source to record all the options for referencing in other tables.
Note: In the table that is used as the data source, make sure the options are selected in the correct cell and field. For example, you need to select the cities in the cell of the field and not simply configure all the options in the field configuration panel.
Use cases:
  • Location information: Options for cities change based on what users select for province.
  • Store inspection: Options for tasks will change based on what users select for task group.
  • Item requisition: Options for products will change based on what users select for category.
II. Steps
Taking the item requisition as an example, this article will explain how to set up a hierachical relationship between the product category and the products.
Once configured, the fields will work like this: When "Food" is selected as the product category, "Milk" and "Coffee" can be selected as the product. When "Office supplies" is selected as the product category, "Notebook" and "Pen" can be selected as the product.
250px|700px|reset
  1. Create source table for referencing
  1. Open the base and create a table (Inventory management in this example).
  1. Create two single option fields, namely Product Category and Item Name.
  1. In the Product Category field, enter first-level information such as food, office supplies, and so on. In the Item Name field, enter the items that belong to each category.
250px|700px|reset
  1. Dynamically link the first and second level information
In the table where the options will be referenced (Item requisition in this example), create two single option fields: Requisitioned product category and Requisitioned item name.
250px|700px|reset
Configure the Requisitioned product category field
  1. Double-click the field name of Requisitioned product category and select Reference options in the panel.
  1. In the Look up data in this field section, select the Inventory management table and the Product Category field.
  1. Click Confirm to save the configuration. All the options from the Product Category field can now be selected for this field.
Note: The content referenced are the options that have been selected in the source table and not all the options configured for the single options field itself. As such, to add new options that can be selected in the current table, you must add the option to the single options field and select that option in the source table first.
250px|700px|reset
Configure the Requisitioned item name field
  1. Double-click the field name of Requisitioned item name and select Reference options in the panel.
  1. In the Look up data in this field section, select the Inventory management table and the Item name field.
  1. To link the product category with the item, you need to add a reference condition. Click Add Condition, and in the Reference the content if section, select Product Category, is, and Requisitioned product category. The first field is the field in the source table and the second field is the field in the current table.
  1. Click Confirm to save the configuration.
250px|700px|reset
250px|700px|reset
As shown in the figure below, when you select a category in the Requisitioned product category field, only the items that belong to that category can be selected for the Requisitioned item name field.
250px|700px|reset
III. FAQs
When referencing options for single option and multiple option fields, which field types are supported?
You can only reference options from single option and multiple options fields.
Can multiple reference conditions be set when referencing options?
Yes, up to five reference conditions can be configured.
Written by: Lark Help Center
Updated on 2024-12-05
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom
rangeDom
rangeDom