You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Form ID

Table Name

leaveApplication

leave_application

leaveDetails

leave_details

Relationship: In this example,  the 'parent' form (leave application) has one 'child' form (leave details).
Creating the Child Form: leaveDetails


First, you will need to create a child form or the form that you would want to embed in your parent form. In the child form, add a field that will be used to store the ID of the parent form. In this example, we added the field leave_application_id.

Creating The Parent Form: leaveApplication


In the parent form, you can (optionally) add a field that will be used to store the ID of the child form. In this example, the field leave_details_id has been added. This is only needed in situations where there is a one-to-one relationship between the parent form and the child form. You can then embed your child form in the parent form by dragging the Sub Form form element into the section that you want the subform to appear in.

Linking the Child Form to the Parent Form


To link the child form to its parent, you will need to edit the properties of the subform input that you added to your parent form in the previous step. The following fields are available:

  • Parent Field to keep Subform ID: ID of the field in the parent form that will be used to store the ID of the child form

  • Subform Field to keep Parent ID: ID of the field in the child form that will be used to store the ID of the parent form

Using Your Newly Created Form

When using your parent form in a process activity, the system automatically fills in the IDs of the parent and the child forms upon form submission.

One-to-One Relationship
In a one-to-one relationship, you will only have to select a form to be used in the subform properties. The child record will use the parent form ID as primary key.  In this case,
"Parent Field to keep Subform ID" can be set so that the parent form has a reference to the child record.Sample dataTable: leave_application

id

leave_details_id

....

1550

1550

....

Table: leave_details

id

leave_application_id


1550

1550

....

  • No labels