Creator Scripts.
Creator Scripts.
Zoho Trusted Partner in Digital Transformation

Establishing a Bi-Directional Relationship in Zoho Creator: A Step-by-Step Guide

05.07.23 06:56 PM By CreatorScripts

In the world of data management, seamless data flow is critical. Zoho Creator offers a unique functionality, allowing you to configure a bi-directional relationship between the main form and subform. This tutorial will provide a step-by-step guide on how to accomplish this.

A bi-directional relationship in Zoho Creator permits mutual data flow between related forms. This means that any data entered or modified on the main form can be accessed and altered on the subform, and vice versa. The automatic synchronization of changes made to records in either form simplifies and streamlines data management processes.

To understand this process better, let's go through the steps to establish a bi-directional relationship between two forms using an order processing app as an example:

  1. Setting Up the Forms: For this example, we have two forms: The main 'Order' form to receive customer orders and a 'Line Items' subform to select products with varying quantities.

  2. Creating a Bi-Directional Relation: From the 'Line Items' form, open the editor and access the Form Builder. Add a lookup field from the Advanced Field section. Select the main 'Order' form and choose the relevant filter link. In our case, we choose the 'Name' field.

  3. Enabling Bi-Directional Connection: Zoho Creator automatically detects if a relationship already exists between these forms. You will see an alert box with an option to enable the bi-directional connection. Click to enable the relationship.

  4. Selecting the Existing Relation: Zoho Creator will display the list of existing relations in the main form. As 'Line Items' is already a subform in the 'Order' form, the subform field name 'Items' is listed. Select the existing relation, choose the required display format, and click 'Done'.

  5. Hiding the Field: This lookup field now syncs data bi-directionally with the 'Order' form by mapping its record ID. Hide this field from the users by choosing the 'Admin Only' option from the visibility section, as this will be inappropriate for the users.

The changes are saved, and a bi-directional relationship has been established between your main form and subform.

This bi-directional relationship allows you to access and modify data across related forms seamlessly, ensuring that any modifications made to the data in the 'Line Items' report will automatically update the record in the 'All Orders' report. Additionally, the 'Order' form fields can be viewed on the 'Line Items' report, helping store owners keep an accurate count of products purchased by each customer.

Understanding and utilizing the bi-directional relationship feature in Zoho Creator can significantly improve your application's data flow and overall efficiency. If you found this tutorial helpful, be sure to subscribe to our YouTube channel for more informative content!

What is a subform in Zoho Creator?

A subform is a form within a form containing a set of questions. That specific set of questions can be duplicated or repeated dynamically within repeating sections. You can use the subform to collect multiple entries of the same category effortlessly.

How do I create a sub form in Zoho Creator?

Add subform field to your form Open the form builder. Add a subform field to the form. ( Refer to this page to learn how to add a field to a form) If your app does not have any additional forms, Zoho Creator will add a blank subform. ... Select the required choice from the dropdown, then click Done .

What is the subform limit in Zoho Creator?

The maximum number of subform fields you can add in a layout is 10. The maximum number of entries across all subforms on an aggregate is 200.

How do I get subform data in Zoho Creator?

The Field API names of the subform can be acquired using Fields Metadata API of the parent module. The Field API names of the individual fields in a subform can be acquired using Fields Metadata API, with the request URL as "fields? module={Sub_form_api_name}".

What is the purpose of subform?

The subform control provides properties which allow you to link the data displayed in the control to the data on the main form. The property of the subform control that determines what object is displayed in the control. A simple display of data in rows and columns, much like a spreadsheet.

CreatorScripts