Skip to main content

Checking Whether All Subform Records Pass

Overview

A subform may contain multiple records, with each record including a field that indicates whether it passes validation.

The Main Form field is marked as Pass only when every record in the Subform is marked as Pass. If any Subform record is marked as Fail, the Main Form field is also marked as Fail.


Use Cases

This method can be used in scenarios such as:

  • Student Information Management: Check whether all students have passing grades.

  • Quality Management: Check whether all products have passed quality inspection.


How to set it up

This example uses student information management.After entering each student's name and score in the Subform, configure a formula to automatically determine whether the score is passing.When all students have passing scores, the Main Form field is marked as Pass. Otherwise, it is marked as Fail.

Step 1: Configure the “Pass/Fail” Field in the Subform

First, configure the Pass/Fail field in the Subform to determine whether each student's score is passing.

Enter the following formula:

IF(Subform.Score>=60,'Pass','Fail')

This formula means If the score in the current Subform record is greater than or equal to 60, the student's grade is marked as Pass. Otherwise, the grade is marked as Fail.

Step 2: Configure the “Overall Pass/Fail” Field in the Main Form

Next, configure the Overall Pass/Fail field in the Main Form.

Enter the following formula:

IF(SEARCH('Fail',TEXT(Subform.Pass/Fail))>0,'Fail','Pass')

This formula means if Fail appears in the Subform's Pass/Fail field, the Main Form field is marked as Fail. If no Subform record is marked as Fail, the Main Form field is marked as Pass.

For more information about the functions used in these formulas, see:

  • IF Function

  • SEARCH Function

  • TEXT Function


Result

Finally, let's take a look at the overall result:

Did this answer your question?