GroupFilled and repeatable group?

The current documentation says (Validation Language, 4.6.3 Predicate language constructs for groups):

If a group is repeatable, GroupFilled(Group) is also valid for empty rows of a repeat that have been created.

However, it seems that GroupFilled just cannot be used for repeatable groups at all.
Here I have a repeatable group with just 2 string fields, and try to use GroupFilled:

With asterisk (as suggested by SME’s completion popup):
bild

Without asterisk (as suggested by the previous error message):
bild

Are you kidding me? Either way I try it, I get told to do it the other way?!

Have I misunderstood anything or is this a documentation bug?

P.S.
NotAllGroupsFilled , GroupsNotCollectivelyFilled , and AllGroupsFilled show the same behaviour, but the docs (same section) explicitly say

The arguments may not use an asterisk.

Which could maybe be interpreted as “these functions cannot be used with repeatable groups at all”.

Hi @stephen-warm-graph,

The operator, GroupFilled(Group), may be used for repeatable groups. Here are some valid combinations based on this workspace:

  • Example 1
    Rule: error_field_is_my_index_field
    Error Field: /root/StringOnlyGroup/my_index_field
    Error Condition: GroupFilled(RuleGroup)

This is modeled inside the repeatable group. The error field is also inside the repeatable group. There can be up to 5 error messages (one for each instance of the repeatable group, StringOnlyGroup[5]) and there can be 5 error fields. This means that the repeatability of the error messages and error fields match correctly.

  • Example 2
    Rule: error_field_is_string_field
    Error Field: /root/StringOnlyGroup/string_field
    Error Condition: GroupFilled(StringOnlyGroup)

This is modeled outside the repeatable group. Once again, the error field is inside the same repeatable group so that the repeatability of the error messages and error fields match correctly.

  • Example 3
    Rule: error_field_is_my_error_field
    Error Field: /root/my_error_field
    Error Condition: FieldFilled(my_error_field) and GroupFilled(StringOnlyGroup For "my index")

This is modeled outside the repeatable group. The error field is also outside the repeatable group, so we need a way to reduce the number of possible error messages to 1.

Your idea of using the Asterisk operator to consider the list of groups was good, but the documentation describes the rule as, GroupFilled(Group). This means that we can only reference a single group and not a list of groups. StringOnlyGroup* returns a list of groups so may not be used, as seen in your first screenshot.

You can reduce the number of possible error messages to 1 by specifying an index. In this example, I created the field, my_index_field and set that as the index field for StringOnlyGroup. I can now specify an index using the Semantic Index. This means that I only have one error message possible, the error message for the instance of the repeatable group with the index, “my index”.

Please note, you cannot use the filter operator, Having, with groups, so the Semantic Index is the only way to go.

I could reproduce your second error by modeling the rule outside the repeatable group with an error field that was also outside the repeatable group. As I showed in example 3, please consider using a Semantic Index. Alternatively, you could move the rule or change the error field, as I did in examples 1 and 2.

Please note, these rules all reference GroupLists, see NotAllGroupsFilled, GroupsNotCollectivelyFilled and AllGroupsFilled. This is why the documentation must specify that these operators may not use an asterisk to generate the list of groups from a repeatable group.

You could, however, create a list of groups based on Semantic Indexes, for example:

NotAllGroupsFilled(StringOnlyGroup For "my 1st index", StringOnlyGroup For "my 2nd index", StringOnlyGroup For "my 3rd index")

Dear @stephen-warm-graph, did the response of @malcolm-silver-ice help? If so, please, mark it as solved using a check icon below the helpful response. If not, feel free to ask for additional explanations.