Hi!
I have a document model “PartnerAddresses”, which I include into a model “Broker” as “BrokerAddresses” and in a model “Client” as “ClientAddresses”.
Now, I want to have a validation on “Addresses”, which is a repeatable group. If I include the validation in the basis model “PartnerAddresses”, then my model breaks, because the path of the group “…Adresses” is not longer valid for ClientAddresses and BrokerAddresses, as shown in the screenshot.
Is this how it is supposed to work? So, if I have a common model which I include with different names, I have to add the validation in each instance separately? Or is there a way to model the path relatively?
Common model:
Broker model
Client model:
Thanks ,
Maria
Hey @maria-wintry-ice,
for relative paths it is not needed anymore to give the name of the turning point (so instead of ..Address just use .. see here).
and as just discussed, if you want to validate that a user created at least one repetition, you need to validate from “outside” the repeatable group. In your case with a Validation Rule in the Client Document Model, that checks, that at least one repetition is present. So the error statement could be “NumberOfFilledGroups(ClientAdress*) == 0” or “NoGroupFilled(ClientAdress*)”
Thanks @felix-blazing-river.
As discussed with you, in my example above there were several different problems. You commented on what a correct rule would be.
To make the information complete:
the problem I displayed in the screenshots was due to the fact, that in “PartnerAddresses” my group is not a repeatable group, but in Client and Broker it is. So this breaks the added rule. So I need to add a validation for Client and Broker, separately.