Default Number of Rows in Subform
Introduction
Feature(s)
You can fix the number of rows displayed in the subform when members fill out a form. Members cannot add or delete the rows manually.
Application Scenario(s)
- In the case of gift collection, the receipt details are entered through a subform. In the case where each person is limited to receiving only one type of gift, the default number of rows in the subform can be set to one.
- In the case of student performance management, students' scores for each subject are recorded through a subform. Since the number of subjects is fixed, you can set a default number of rows in the subform.
- In the case of employee performance management, the performance scores of department employees are recorded through a subform. Since the number of employees is fixed, the default number of rows in the subform can be set to limit the content to be filled in.
Preview
When you record students' grades, three rows of data are displayed by default in the grade details subform. You cannot add or delete them manually, and can only edit three rows of records.
1. When the initial value is displayed in the subform, the effect is as follows:
2. When the initial value is not displayed in the subform, the effect is as follows:
Setting Procedure
Designing a Form
Taking the student grade registration as an example, create a Student Grade Entry form. The field settings are as follows:
Field Name | Field Type |
Grade Entry Date | Date&Time |
Grade Submitter | Member |
Student Name | Single Line |
Grade Details | Subform |
Subjects | Subfield > Single Select |
Grade | Subfield > Number |
Setting Initial Value (Displaying Initial Values)
The form can display a set number of rows in a subform, with predefined initial values:
1. Select the entire Grade Details subform, go to Field Properties > Initial Value, select Custom from the drop-down list, and click Settings:
2. In Initial Value, click Add to add the default number of rows in the subform, enter values for each row, and click OK.
Note:
You need to enter initial values for every single row when you set the default number of rows in a subform.
Creating Auxiliary Fields (Not Displaying Initial Values)
The form can display a fixed number of rows in a subform, but not display the initial values:
1. You can add a Single Line field as an auxiliary field in a subform. When you set the default number of rows, you can enter anything as the initial values:
Note:
You need to enter initial values for every single row when you set the default number of rows in a subform.
2. If you want to set the auxiliary field as invisible for members when they fill out the form, you can select the Single Line field, go to Field Properties, and untick View under Field Permissions.
Setting Field Permissions
If you want to fix the number of rows, which means members cannot add or delete rows manually, you can select the entire Grade Details subform, and only tick Edit Existing Records under Field Permissions.