Hi,
I'm trying to make someting in my new DB and i'm not getting it.
The thing is.
I have a budget table, that have a budget_items table as children
and I want that in the order table when I select in drop-down list that budget,
the budget_items of that budget appears as children table of the orders table.
Any suggestion?
Get children table from other table
Re: Get children table from other table
Anyone can help?
Re: Get children table from other table
I don't know if I have understood you question completely.
If you want to filter the rows of the child-tab table (or even display a modified list) after changing a value of the master-record in user interface (UI), I'm afraid there is nothing built in. This is not the way master-children have been implemented in AppGini and other RAD/CRUD software.
Maybe you should explain your target, so we can better understand your needs and perhaps propose a different, but working solution.
If you want to filter the rows of the child-tab table (or even display a modified list) after changing a value of the master-record in user interface (UI), I'm afraid there is nothing built in. This is not the way master-children have been implemented in AppGini and other RAD/CRUD software.
Maybe you should explain your target, so we can better understand your needs and perhaps propose a different, but working solution.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Get children table from other table
My idea is,
I have a table of budgets, that have a children table budget_items.
Then I have the orders table that I have a lookup field where I choose what is budget sent to the customer who will generate this order. When I choose this budget my intention is that show as children table of this order the children table of the budget selected.
I hope I have clarified better.
I have a table of budgets, that have a children table budget_items.
Then I have the orders table that I have a lookup field where I choose what is budget sent to the customer who will generate this order. When I choose this budget my intention is that show as children table of this order the children table of the budget selected.
I hope I have clarified better.
Re: Get children table from other table
Anyone can help?
Re: Get children table from other table
Anyone can help?
Re: Get children table from other table
Honestly speaking, I did not get your idea.
And definitely AppGini does not support changing the list of related child-records when changing a lookup selection in one master record in UI.
If you need filtering of all child records on the fly, I have no efficient hooks-only idea. If you can cope with totals or some kind of summary of items of the selected budget, consider adding a calculated field at budget level and then use autofill option. This will show the summary field immediately after selection of a budget.
And definitely AppGini does not support changing the list of related child-records when changing a lookup selection in one master record in UI.
If you need filtering of all child records on the fly, I have no efficient hooks-only idea. If you can cope with totals or some kind of summary of items of the selected budget, consider adding a calculated field at budget level and then use autofill option. This will show the summary field immediately after selection of a budget.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Get children table from other table
I'm near of my need.
I add a second id_lock in my budget_items. So the first id_lock define child-records to the budget and the second id_lock define child-records to the order.
After that add this code to orders_after_update and after_insert.
sql("UPDATE `budget_items` SET `id_lock2` = {$data['id']} WHERE `budget_items`.`id_lock` = {$data['budget']}", $eo);
Work fine, but if I have the same budget items for many orders I have to update the Page to update the value of id_lock2
It was any way to use this code on orders.init()?
I add a second id_lock in my budget_items. So the first id_lock define child-records to the budget and the second id_lock define child-records to the order.
After that add this code to orders_after_update and after_insert.
sql("UPDATE `budget_items` SET `id_lock2` = {$data['id']} WHERE `budget_items`.`id_lock` = {$data['budget']}", $eo);
Work fine, but if I have the same budget items for many orders I have to update the Page to update the value of id_lock2
It was any way to use this code on orders.init()?