Multiple Forms for the Same Table
-
- Posts: 9
- Joined: 2015-02-04 19:54
Multiple Forms for the Same Table
Rather than creating multiple tables in my application, I want to use a single generic table to hold all records. There will be a Parent Table that will contain only only 1 field - a Category field that will be a dropdown list containing for example "Cars, Planes, Bikes, Boats'. The Child table will also have a Category field (to provide the linkage), and the other data fields will be called Field1, Field2, Field3 etc. If a user selects 'Cars' from the Parent Table, and 'New' in the Child table, it will autopopulate the Category field in the Child table with 'Cars'. Now comes the issue. I want the captions in the Detail form to be unique to the selection in the parent table. So for example, if 'Cars' is selected, Field1 would have a caption of 'Make', Field2 'Model', Field3 'Year' etc. If 'Planes' was selected, Field1 must have a caption of 'Type', Field2 'Propulsion System', field3 'Manufacturer'. The fields remain the same in all forms; it is just the captions that change. Any thoughts?
Re: Multiple Forms for the Same Table
This is unfortunately not directly supported in AppGini but can be implemented using hooks (see: http://bigprof.com/appgini/help/advance ... ific-hooks )
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Multiple Forms for the Same Table
Hi Admin
I have a simmilar question, and im not sure if its the same question as posted here but i want to have a single table hold all the records of multiple other tables for example the main table is called products and then there is 3 other tables that are linked as child tables and everytime there is a new record added , edited or deleted on these other 3 tables it will do the same to this main table?
PS sorry again for posting here as i dont know how to start my own question thread
Kind Regards
Richard
I have a simmilar question, and im not sure if its the same question as posted here but i want to have a single table hold all the records of multiple other tables for example the main table is called products and then there is 3 other tables that are linked as child tables and everytime there is a new record added , edited or deleted on these other 3 tables it will do the same to this main table?
PS sorry again for posting here as i dont know how to start my own question thread
Kind Regards
Richard
Re: Multiple Forms for the Same Table
Hello @pdweinberg!
In the 2nd and 3rd screenshot you can see that I have changed the labels on the fly depending on a dropdown-selection. It will also be possible to replace the labels' content depending on some kind of "type_id" value according to string values from another database table for example.
You can send me a PM, If you need further support.
Regards,
Jan
As Ahmad already said, there is no built-in solution, but it IS possible to change the labels on the fly using JQuery and maybe one AJAX call + serverside PHP script. I did it in one of my projects which is described here: https://forums.appgini.com/phpbb/viewto ... 8934#p8550pdweinberg wrote: ↑2015-02-04 20:24The fields remain the same in all forms; it is just the captions that change. Any thoughts?
In the 2nd and 3rd screenshot you can see that I have changed the labels on the fly depending on a dropdown-selection. It will also be possible to replace the labels' content depending on some kind of "type_id" value according to string values from another database table for example.
You can send me a PM, If you need further support.
Regards,
Jan
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: Multiple Forms for the Same Table
Hi Jsetzer...
Was that meant for me or pdweinberg as the msg thread is from 2015?
Regards
Richard
Was that meant for me or pdweinberg as the msg thread is from 2015?
Regards
Richard
Re: Multiple Forms for the Same Table
Hello @urichard,
my post is an answer to pdweinberg's question as I have written in the first line:
Concerning your question:
As far as I can see, your question is something completely different. Yes, you can write code after insert/update of your child-tables to modify the related master-record. Using includes there will be only very little code per child-table.
Regards,
Jan
my post is an answer to pdweinberg's question as I have written in the first line:
Maybe it helps someone.Hello @pdweinberg!
Concerning your question:
As far as I can see, your question is something completely different. Yes, you can write code after insert/update of your child-tables to modify the related master-record. Using includes there will be only very little code per child-table.
Regards,
Jan
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