NotAllFieldsFilled in repeat is not working

I am in version 2024.06-ext3.
I have a repeatable group R in a not repeatable group N. In this group, I have several fields, one of them (Field F) should be required (validated by a rule).
I used the rule
GroupFilled(R) and NotAllFieldsFilled(R*/F).
This rule is placed in group N.
But somehow it throws an error, even if the field F is filled in all groups.
I don’t get where I am wrong here.
As an example I added a small model with a validation of the postal code of the address:
Person_DM.json (46.2 KB)

Hi @clara-fleet-yew,

The rule fires as expected in my tests.

GroupFilled(R) And NotAllFieldsFilled(R*/F)

This tests 2 partial conditions:

  1. If you have pressed “Add” and added a row to your repeat, R
  2. If all the Fields in the Field List R*/F or not

The Documentation puts it like this: “The condition NotAllFieldsFilled(FieldList) is satisfied if at least one value is not specified for a Field in FieldList.”

The key idea is that this Language Construct looks at all the Fields in the FieldList whether they have been created or not. This means that this precondition is true until the number of Filled Fields equals the maximum number or repetitions in your repeatable group, R.

2 of 3 repeats are filled → rule fires
Simple_Model_Editor_MbN8wU7eCV

3 of 3 repeats are filled (the add button disappears) → rule does not fire
Simple_Model_Editor_smocMqlBi1

Please feel free to test this in my test model
NotAllFieldsFilled_DM.json (4.1 KB)

Regarding

I would question your modeling strategy. As far as I understand the requirement, the Field, F, should be filled for each group, R, that is present. You can achieve this in a number of ways

  1. Use the “required” flag
  2. GroupFilled(RuleGroup) and FieldNotFilled(F) in the Rule Group, R.

Both of these approaches will lead to an error being shown on the Repeat where the Field Value is missing. Unfortunately, your current approach triggers for every group in the repeat even if a value is present for that index.

Simple_Model_Editor_v4NAFKYipA

Switching to the “required” flag or FieldNotFilled() would resolve this
Simple_Model_Editor_cTKn2y5wLK

I modeled this rule in the example model that I added to my previous post so you can easily test both.