One to Many Relationships
back to results  share
Administration > Modules > Relationships > One to Many Relationships

One to Many relationships are the most common type of relationship. They are simply a field in a module which allows you to link to a different module. One parent module record can be connected to many child records.

    To add a one to many relationship to a module:

  1. Go the Form Manager by clicking on the Wrench, then Modules, then Form Manager. Select the module that you wish to modify.

  2. Click "New Field" on the left hand side.

  3. Enter a label for your field. Select the "Data Source" Field Type. Select the module that you wish to link to. Make sure the relationship is set to "One to Many." Click "Submit." Remember, when creating a one to many relationship, you're putting the field in the module that is the many.

  4. Drag the field into your layout. Click "Save Layout."

  5. Now go to view your module. Click the plus button to add a record.

  6. Your new relationship will now be one of the fields. It will show all of the possible records from the module you have chosen. Choose a record and click "Submit." Your relationship is now saved within this new record. Note: the options that you will be selecting from are the ones in the one to many relationship.

  7. Note: The module in which you place the relationship field is the "many" aspect of the one to many relationship. This is because you can have multiple records (in your original module) to one linked record (in the module you selected for your relationship). In this example, we have one Area record to many Example records. This is because we can easily create another Example record and select "Rehab 1" as our relationship, even though we have already selected "Rehab 1" in the previous record. Thus, Area is the "one," and Example is the "many."

For more information on Relationship Fields, see these related articles.