Font Size:
Ask Joget AI

Designing Many-to-Many Relationships in Joget Forms

Introduction

This article discusses how to design a many-to-many form/record relationship based on the sample app.

There are 3 tables needed in total in order to form a many-to-many relationship:

  • Many2Many_table1.
  • Many2Many_table2.
  • Many2Many_joiner.

The last table mentioned acts as the junction table.

How does it work?

    1. In this generic sample app, "Form 1" is treated as an ingredient and "Form 2" as a recipe.
    2. The figure below shows the list of recipes.
    3. The figure below shows the list of ingredients.
    4. A recipe requires multiple ingredients, and an ingredient is used by multiple recipes. The following figure depicts the "joiner" records.
    5. This is what the Many2Many_joiner table records look like. Observe c_id_form1 and c_id_form2. They are the foreign key to Many2Many_table1 and Many2Many_table2 respectively.
    6. This is Many2Many_table1 data.
    7. This is Many2Many_table2 data.
    8. The app is created using a simple Select Box and Form Grid. You may study its design by downloading the sample app below.
    9. The figure below shows the design of Form 1.
    10. Based on the figure below, it is observed that Form 1 has:

      • An ID Generator field to create a running number as a record ID.

      • Text Field.

      • Form Grid to select items from Form 2 to be stored in the joiner table.

    11. The joiner form contains just 2 Select Box fields.
    12. Each of the Select Box would point to Form 1 and Form 2 using the default Form Options binder as shown in the form structure figure below.
      • Relationship description.

      • Entity Relationship Diagram (ERD).

    13. You may try it out yourself by downloading the sample app below.

Related documentation

Download sample app

Download the demo app for Designing Many-to-Many Relationships in Joget Forms:
Created by Julieth Last modified by Debanraj Ravindran on Apr 24, 2026