Designing a Form with a Subform allows you to add more flexibility to your Form. Subforms are Forms within a Form, therefore creating a Subform is similar to creating a Form.
If you want to collect data on a repetitive basis, you can add a Subform field and define the frequency using a Date, Month or Week field. You can make that field a Key field for the Subform so as to alert users for duplicate entries for that specific time period for example.
By marking a date-related field as a Key field, you can also add a Lock to the Subform.
The maximum number of Subforms within a Subform is 5. The maximum number of Subforms within a Form is 30.
How to design a Form with a Subform
Follow these steps to create a Form with a Subform:
- Navigate to your Database. If you do not yet have a Database, see add a Database.
- Click "Add Form" to open the Form Design page.
- Name to your Form and click "Add a field" to view the palette of available Field types.
- Click "Add field" and click on "Subform" to add a Subform to the Form.
- Fill in the properties of the Subform field by providing the following information:
- Label: the name for the Subform
- Description: optionally provide a description
- Code: optionally provide a code
- Record label
- This is important because when you view a Form that has a subform with subrecords, you can identify each subrecord based on one of the following values:
- Record label, if defined on the subform;
- Concatenation of key field values, if key fields are defined on the subform;
- First text field defined on the subform;
- Record id, if no text fields are defined.
- In the Settings check the boxes you want to apply for the Subform field.
- Click on "Done" to add the Subform.
Success, the Subform is added.
Adding Fields to a Subform
Click on it to open the Properties tab and click on "Open Subform" to start adding fields to the Subform.
Make sure that the fields added to a Required Subform can be filled in during data entry. For example, a Subform that consists only of Fields with Relevance rules or the 'Hide from entry' property checked might prevent a user from saving a record altogether.
- You can design the Subform in the same way you would design a Form. Click on "Add a field" to start adding fields define the fields properties to make the Subform even more flexible.
- Click on "Save" on the Form Design page to save the changes.
If you want to collect data on a repetitive basis, you can add a Subform field and define the frequency using a Date, Week , Fortnight, or Month field as a Key in the Subform. You can make that field a Key field for the Subform so as to alert users of duplicate entries for that specific time period or to be able to add a Lock to the Subform.
- Users will be able to add Records to the Subform.