The error field is not in the rule group, but the condition specifies iteration

Hi,
I want to have a computation in the “Computations” folder in a CDM model, the computed field is inside a repeatable group in the root model. However I got this error message and I cannot find relevant description in the a12 doc for this particular error.

Could you please advise me what should I do?

Hi @tam-fast-gorge

This question is similar to DocumentValidationException: Rule with path ‘/path/to/a/validation’: Iteration for ‘/a/model’ is specified, but the rule can fire for not filled repetitions of this repetition level so I an going to reference the models used in that post.

Modeling a similiar Computation Rule leads to the same error that you posted.

Adding the specification GroupFilled(/subsidiary/nameInLanguages) would normally resolve this but there is a modeling limitation that Rules relating to Repeatability need to be “in the same trouser leg”. What I mean by this is that your reference to the repeatable group cannot

  1. Go up to a parent group and then
  2. Down into a different group

This is described in the Documentation in Example 3. (This relates to the Error field but the same is true for Computed Fields.

There is an open ticket relating to this topic, A12-15148.

Currently, there isn’t an easy modeling workaround as you need to model this rule in the group “Angebot” and, as this is an include, it is not possible.

Hello @tam-fast-gorge , I am a member of the Discourse team. I can see that there was a new response to your question on the Topic of the discussion. Do you find it helpful, or should the question remain open?

Thanks ahead for your feedback and have a nice rest of the day!

Hi @svenja-still-dawn the answer explained really well why I ran into this error. We went for a different approach to solve the requirement already. Thanks.

Hello @tam-fast-gorge thanks for the reply :slight_smile:
Would it be possible to explain your approach, so maybe other projects could benefit from it, if they ran into the same issue?