Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Form ID |
Table Name |
---|---|
leaveApplication |
leave_application |
leaveDetails |
leave_details |
Relationship: In this example the leave application (the 'parent' form) has one leave details (the 'child' form).
Creating the Child form: leaveDetails
First you will need to create a child form. The child form is the form that you want to embed in your parent form. In the child form you will need to add a field that will be used to store the ID of the parent form. In this example the field 'leave_details_id' has been added.
Creating The Parent Form: leaveApplication
In the parent form you (optionally) can 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 1-to-1 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:
Using your newly created form
Now when you use your parent form in a process activity, the system will automatically fill in the IDs of the parent and the child form in when the user submits the form!
One to One relationship
One will only need to select on which form to be used in the subform's properties if it is a 1-1 relationship. The child record will use the same ID as the parent form as the primary key.
"Parent Field to keep Subform ID" can be set in this case so that the parent form has a reference to the child record.
Sample data
Table: leave_application
id |
leave_details_id |
.... |
---|---|---|
1550 |
1550 |
.... |
Table: leave_details
id |
leave_application_id |
|
---|---|---|
1550 |
1550 |
.... |