Start a new topic
Answered

How to make inserting child rows mandatory in a Form

Hi Community,

We have created a form through which we save Employee data and Employee's address through a separate section.

And we have 1-many relationship between Employee Entity and Address Entity, address being the child entity.

So we want to make entering an address row mandatory while creating an Employee through the Application Form.

How can this mandatory child entity relationship be enforced in the form?


Thanks


Best Answer

Hello,


To achieve that, you can create a validation rule that will allow creation of a record only if it already has a child. (any ChildEntities has (1=1) ).

This rule should be used only after the child creation part of the stepper (or you will be unable to create a record).

Here is some screenshot on how to proceed:


The validation rule of the parent entity:




In the stepper of the parent entity:

In the step for the creation of the parent, SKIP the rule, or you will be blocked before the opportunity of creating a child record.


In the step for the creation of the child, set this validation rule to WARN or BLOCK.



Then, when trying to create a parent without a child, an issue will be raised : 


Hope this help,

Guillaume

1 Comment

Answer

Hello,


To achieve that, you can create a validation rule that will allow creation of a record only if it already has a child. (any ChildEntities has (1=1) ).

This rule should be used only after the child creation part of the stepper (or you will be unable to create a record).

Here is some screenshot on how to proceed:


The validation rule of the parent entity:




In the stepper of the parent entity:

In the step for the creation of the parent, SKIP the rule, or you will be blocked before the opportunity of creating a child record.


In the step for the creation of the child, set this validation rule to WARN or BLOCK.



Then, when trying to create a parent without a child, an issue will be raised : 


Hope this help,

Guillaume

Login to post a comment