Checking whether a value of a repeatable is included in another repeatable in a linked entity

Hi,

I’m looking for a solution for a following problem:

I have 2 data models with a countries list (repeatable), one is a sort of a configuration where a user can define a list of countries; the other is a declaration where a user have to add several locations. “Location” is a repeatable group with fields country and coverage.

There is exactly one configuration entity, and each declaration is linked to it.

I want to calculate the coverage field in the location-repeatable so that it’s “excluded” if the country is in the list of coutries in the configuration and “included” if it’s not.

Is there a way to do this?

I tried to add a computation in my declaration_cdm but get following error

The value of the coverage doesn’t necessarily need to be saved btw, it’s ok as long as we can show the correct coverage in the UI.

Thanks,

Jana

Hi @jana-dark-core

Can you provide a bit more information relating to the Document Model Structure. I need to know:

  • Which Groups in the Paths used in the Rule are Repeatable?
  • Where is the Rule modeled? In other words, what is the Rule Group?

:warning: Currently, the Computed Field is referenced in the Precondition. This is forbidden and will cause an error once we’ve resolved the error that you’re currently seeing.