Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Question Master/Detail Add Structure (Read 1399 times) previous topic - next topic

Question Master/Detail Add Structure

I am currently using the latest version of Phprad Classic.

I have a master table with 3 detail tables. I've managed to use master detail well by adding a master reference to each detail table (under "Add Page Properties"). so that when I add data to the master table, the details will appear on one page at a time.

My question is, how to place the arrangement of each table detail when the add master table page? as an example:

- Master A
- Detail X
- Detail Y
- Detail Z

want to be:
- Master A
- Detail X
- Detail Z
- Detail Y

I actually want to try using page design, but I have trouble adding the "bind value data field", because there is no master table key field option (only available: USER_ID, USER_NAME, ...)

I really appreciate for every help.


Re: Question Master/Detail Add Structure

Reply #2
hi willvin

ok i will try to be clearer

i have 1 Master Table with 5 Detail Table
Pic 1

In each detail table, in the Add Page Properties option I added MasterForm & MasterField.
Pic 2

Until this condition everything is going well, where when I open the Add Page in Table_A, each field from the master table and fields from the detail table will be on 1 page. 

My question is, how do I change the order of the detail table?
Pic 3

I can't make changes using the page designer, because all detail and master pages are embedded into 1 component
Pic 4

I hope my question is clearer.

Regards


Re: Question Master/Detail Add Structure

Reply #3
@oktovan‍ I understand you clearly now. There is currently no configuration for rearranging the details form in phprad, but you can manually edit it yourself by opening the master form add page with an editor and then rearrange the HTML element the way you want them.

Re: Question Master/Detail Add Structure

Reply #4
hi willvin.. thanks for your explanation

I have often used Custom Design and this is very helpful in customizing the appearance. but always avoid changing pages via the Project Explorer menu because it gives me a warning that the page may not be published anymore.

after I tried to learn more, the detail table arrangement is determined based on the order in which a table is called from the database.
The solution that is quite workable that I found is to drop and re-add a table from the database, so that this table will be the last order (this is not recommended for those who are already in the production stage)

anyway willvin.. can you explain how to bind multiple tables in an Add Page using Page Designer?
pic 1

 

Re: Question Master/Detail Add Structure

Reply #5
@oktovan‍ you can add subpages, just by dragging and dropping a subpage component (Add, View, Edit, and List subpages) into the page you are working on and configuring the component. Depending on the page you are working on and the sub-page component you drag into it, you might get the option of binding fields of the current page to the subpage. You can add as many as you like to the page, see docs here.