Schema Builder of an application | Zoho Creator Help

Schema Builder of an application

In a nutshell

The Schema Builder in Zoho Creator is an interactive visual canvas that gives a bird’s-eye view of your application’s architecture. It displays all the forms and the relationships between them, and stays up to date as forms are added or deleted. You can reposition forms, manage relationships, and check which forms each user type can access. It is especially useful for enterprise applications, where several teams depend on the same data.

Availability 

  1. Schema Builder can be accessed in all plans of Creator.
  2. Super admin, admins and developers will be able to manage the Schema Builder of an application.

1. Overview

A schema provides an overview of an application with the forms that store the data, and how they are interlinked to each other. Together, they provide a foundation for the application’s database and show how data flows from one form to another. The Schema Builder presents this data model visually, helping admins understand the application in a single view, especially for a comprehensive application with several departments and multiple forms.

The Schema Builder gives you a bird’s-eye view of an application by displaying all its forms, including the following types.

  1. Form: A regular form that stores the data submitted to it as records.
  2. Subform: A form placed inside a parent form so that several related records are added together.
  3. Integration Form: A form that exchanges data with another Zoho product or an external service.
  4. Stateless Form: A form that collects data input without saving it as records.


A relationship associates two forms so that one form can fetch data from the other. The Schema Builder displays the relationships between the forms, and based on how the data flows between them, there are three types:
  1. Unidirectional Lookup: A one-way relationship where one form fetches data from the other, but not vice versa.
  2. Bidirectional Lookup: A two-way relationship where both forms fetch data from each other.
  3. Subform: A relationship where the data of a child form is added and managed as part of its parent form.

Lookup relationships can also be created from within the Schema Builder by drawing a line between two forms. The details of each relationship, such as the forms involved, its cardinality, and its lookup fields, can then be viewed in the same view without opening each form individually.

As an application grows, the schema can become crowded and difficult to read. To keep it manageable, forms can be shown or hidden from view so that only the forms of interest remain on screen. This changes only the display in the Schema Builder and does not modify the forms or their relationships for end users. The schema can also be printed, so that the structure of the application can be reviewed with the team before major changes are made.


View schema by permission

Access to the forms of an application depends on the permission set assigned to each user type. This is especially relevant in comprehensive applications, where many teams share a single application.

In the Schema Builder, admins can switch between permissions to see which forms and relationships each user type has access to. Forms that the selected user type cannot access but are related to their accessible forms are indicated visually as inaccessible forms.


1.1. Use case

Zylker Hospital, a multi-specialty hospital, manages patient care, pharmacy, and billing in a single Zoho Creator application named Zylker Care. Each department works with its own set of forms, while data flows between them. The application has many forms, such as Patients, Prescriptions, Dispensed Medicines, Bills, and Medicine Stock, along with the sensitive forms Medical History, Lab Reports, and Family History, which only doctors and clinical staff are meant to access.

As the application grows, the developer needs to routinely check that the forms are linked as required and that no permission has access to more forms than it needs.

For this, the developer opens the Schema Builder of Zylker Care application to get a bird’s-eye view of all the forms and their relationships in one place. The check shows that Bills is not linked to Prescriptions, so the developer adds a lookup from Bills to Prescriptions. The developer then selects the Pharmacy permission, which displays only the forms that the pharmacy staff require, while Medical History, Lab Reports, and Family History are indicated as inaccessible. Repeating this for the other permissions confirms that each of them has access only to the forms it requires and that patient data remains private.


1.2. Navigation guide

In the edit mode of an application, Settings can be selected in the top pane.

Schema Builder can be accessed under Developer Tools in the application's settings.

When environments are disabled, Settings can also be accessed from the More menu at the bottom right of the required application card in the Zoho Creator homepage.

1.3. Prerequisites

Application settings are available only after at least one form has been created in the application. If no forms exist, the Settings option will be disabled.

1.4. Schema Builder dashboard overview

The Schema Builder dashboard provides a visual interface to explore and manage form relationships within an application.


The following components are available on the dashboard:

  1. Refresh: Reloads the schema to reflect any recent changes.
  2. All Forms panel: Lists all forms present in the application. It also displays the total number of forms in the application. The search bar allows you to locate a specific form quickly. Each form has a checkbox that can show or hide it in the schema view. The forms are grouped into:
    • Related Forms: Lists forms that have at least one relationship with another form in this or another application. Forms of other applications are shown in the schema with the application name above the form name.
    • Unrelated Forms: Lists forms that have no relationships with any other form.
  3. Legend: Provides a key for interpreting the schema view.
  4. Permission: Changes the schema view to show the forms and relationships that a selected user type can access. When Schema Builder first opens, all forms are displayed in the Admins view. The available options are:
    • Admins: Includes super admins, admins, app admins, and developers. They have full access to all forms and relationships, and permission sets cannot be assigned to them.
    • Users added to app: They have access to the app. Depending on the permission set assigned, they can view, edit, delete, and manage records and components within the app.
    • Portal users: They have access to the selected parts of application through its portal. Depending on the portal permission set assigned, they can access specific parts of the application through the portal.
  5. Print schema: Prints the current schema view or optionally saves the schema as a PDF.
  6. + Add New Form: Creates a new form directly from the Schema Builder.
  7. Reset: Resets the zoom level of the schema view and the position of the forms to their defaults.
  8. Zoom in / Zoom out: Adjusts the zoom level of the schema view.
  9. Fit to window: Scales the schema view to fit the screen.
  10. Rearrange schema: Auto-arranges forms in the schema view to keep the layout readable and give admins a clearer view of the application.
  11. Enter full screen / Exit full screen: Expands the schema view to full screen. Select again to exit.
  12. Form Overview: Displays the details of the selected form.
  13. Relationship Overview: Displays the details of the selected relationship.
  14. Minimap: Displays a miniature view of the entire schema in the bottom right corner and highlights the current position, to help navigate large schemas.
Form overview

The Form panel displays the following:

  1. Form Link Name: The unique name that identifies the form in scripts and URLs. It can be edited using the rename option.
  2. Fields: The total number of fields in the selected form.
  3. Relationships: The number of relationships the selected form has with forms in the same application or in other applications.
  4. Permissions: The list of all the permissions that have access to the form.
  5. Fields tab: The list of all the fields added to the chosen form.
  6. Reports tab: The list of the reports created for the form.
Relationship overview

The Relationship panel displays the following:


  1. Related forms: The source and target forms of the relationship. The arrow points from the source form, which holds the lookup field, to the target form, whose data it fetches. For example, New Task → Add Sales means that New Task fetches data from Add Sales.
  2. Cardinality: The type of relationship between the two forms. A 1:1 cardinality is a one-to-one relationship, created by a lookup with single selection. A 1:N cardinality is a one-to-many relationship, created by a lookup with multi selection or by a subform, based on how it is configured.
  3. Fields with Relationships: The list of all the lookup fields, that is, fields that have relationships with other forms in the same application or in other applications.

2. Managing Schema Builder

The Schema Builder lets you review and manage the architecture of the application from a single view, without opening each form individually. This includes:

  1. Creating a new form
  2. Creating a relationship between two forms
  3. Editing a form

2.1. Create form

A new form can be created directly in the Schema Builder, without leaving the schema view. To create a form:

  1. Select Settings in the top pane of the edit mode of the required application. When environments are disabled, select More at the bottom right of the application card in the Zoho Creator homepage, and then select Settings.

  2. Select Schema Builder under Developer Tools to access the database structure of the application.

  3. Select + Add New Form from the top-right corner of the Schema Builder.

  4. Choose one of the following options to create the form:

    1. From scratch
    2. By importing data
    3. Using Zia
    4. From a template
    5. Using an integrated datasource
  5. Enter the form name and configure the required details based on your choice of form creation, and select Create Form.

The new form appears under Unrelated Forms in the All Forms panel until a relationship is established. By default, the form is accessible in the live mode only to admins, so it is displayed only in their permission views. Others can access it once the form is enabled in the permission that requires it.

2.2. Create relationship

Relationships define how forms are related to each other within an application. The Schema Builder supports creating two types of lookup relationships:

  1. Unidirectional lookup
  2. Bidirectional lookup

Unidirectional lookup

A unidirectional lookup creates a one-way reference from one form to another. The source form can reference the target form, but not vice versa.

  1. Select Settings in the top pane of the edit mode of the required application. When environments are disabled, select More at the bottom right of the application card in the Zoho Creator homepage, and then select Settings.

  2. Select Schema Builder under Developer Tools to access the database structure of the application.

  3. Hover over the source form, and then drag from the dot on the edge of the form to the target form to draw a relationship. New Lookup tab will be selected by default to create a unidirectional lookup. Select Swap to interchange the source and target forms.

  1. Select the field in the source form to create the lookup from, under Reference Field in the Create lookup field pop-up.

  1. Select the Display Type from the options, Drop Down, Radio, Checkbox, or Multi Select, and click Create.

Bidirectional lookup

A bidirectional lookup creates a two-way reference between two forms, allowing both forms to reference each other.

  1. Select Settings in the top pane of the edit mode of the required application. When environments are disabled, select More at the bottom right of the application card in the Zoho Creator homepage, and then select Settings.

  2. Select Schema Builder under Developer Tools to access the database structure of the application.

  3. Hover over the source form, and then drag from the dot on the edge of the form to the target form.

  4. In the Create lookup field pop-up, select the Existing Lookup tab to create a bidirectional lookup.

  5. Select the existing relationship between the two forms under Relations, to extend that unidirectional lookup.

  6. Select the field under Lookup Field to create the lookup in the target form, so that both forms reference each other.

  7. Select the Display Type from Drop Down, Radio, Checkbox, or Multi Select, and then click Create.

2.3. Edit form

A form can be edited from the schema view, so its details can be updated without leaving the Schema Builder. To edit a form:

  1. Select Settings in the top pane of the edit mode of the required application. When environments are disabled, select More at the bottom right of the application card in the Zoho Creator homepage, and then select Settings.

  2. Select Schema Builder under Developer Tools to access the database structure of the application.

  3. Select the form to be edited from the schema view and click the pen icon () in the top right corner of it.

  4. Update the required details in the form builder and click Done.

3. Points to note

Relationships

  1. A lookup within the same form cannot be created in the Schema Builder, but a lookup field that refers to the same form can be added in the form builder.
  2. Relationships cannot be created between forms in different applications in the Schema Builder, but it can be added in the form builder.
  3. Integration forms are linked to external services. Hence, relationships cannot be created with them, and they are always categorized as unrelated forms.
  4. Stateless forms do not store records. Hence, relationships cannot be created with them, and they are always categorized as unrelated forms.
  5. Relationships cannot be created between a subform created using the Blank Subforms option and other forms in the Schema Builder.
  6. A lookup with an inaccessible form cannot be created in the Schema Builder, but it can be added in the form builder.

Permissions

  1. The Schema Builder displays forms and relationships based on the selected permission.
  2. Forms that the selected permission cannot access, but that are related to accessible forms, are indicated visually and listed separately as inaccessible forms.
  3. Developer Console application clients do not have access to the Schema Builder.
  4. The Schema Builder cannot be accessed or downloaded for applications that are installed from the Marketplace or privately distributed via the Developer Console.

4. Related topics

  1. Understand forms
  2. Understand subforms
  3. Understand Integration forms
  4. Understand Stateless forms
  5. Understand lookups