Hi, is there a tutorial on how to create a master detail form in Joget?

Confluence User - 26 Nov, 2024
forms;userviews

4


27 Nov, 2024
confluenceUser
confluenceUser

If what you mean is Header → Detail relationship, the easiest way is by using Form Grid plugin

27 Nov, 2024
confluenceUser
confluenceUser

Example: I have an order and order details. This what I mean. How do I build that in Joget forms?

Orders Table


OrderID CustomerName OrderDate TotalAmount Status
1 John Doe 2024-11-25 150.00 Shipped
2 Jane Smith 2024-11-26 200.00 Pending

OrderDetails Table


OrderDetailID OrderID ProductName Quantity UnitPrice Subtotal
1 1 Widget A 2 50.00 100.00
2 1 Widget B 1 50.00 50.00
3 2 Gadget X 4 40.00 160.00
4 2 Gadget Y 1 40.00 40.00
28 Nov, 2024
confluenceUser
confluenceUser

That is exactly what Form Grid is for. First you need to create the details form which in your case it is the OrderDetails and put the required fields as well as an additional hidden field, you can call it header_id. And then create the header form which in your case is the Order form and put the Form Grid element. You need to setup the Form Grid's load binder and store binder as in Form Grid#Validation&DataBinder to store data to the OrderDetails form.

Alternatively you can use the default Grid element with Bean Shell Form Binder but it is gonna be way more complicated.

28 Nov, 2024
confluenceUser
confluenceUser
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print