Hello!
I'm currently working on a CRUD interface for a normalized PostgreSQL database and seeking some guidance.
Let's consider the following sample tables:
- product table with columns: SKU, supplier_id, material_id
- supplier table with columns: supplier_id, supplier_name
- material table with columns: material_id, material_name
For the CRUD interface of the product table in my Appsmith application, I want to display supplier_name and material_name to the users instead of showing supplier_id and material_id. This is to make the interface more user-friendly and intuitive.
I'm aware that this will involve JOIN operations to fetch the names for display. However, when it comes to adding or updating entries in the product table, users will be selecting supplier_name and material_name from dropdowns, and I'll need to convert these back to their respective IDs to maintain the integrity of the database relations.
Could anyone share insights or examples on how to best handle this scenario in Appsmith? Specifically, I'm looking for advice on:
- Efficiently fetching and displaying names instead of IDs in the table widget.
- Implementing logic for converting names to IDs during insert/update operations, ensuring a seamless user experience.
Any guidance, tips, or resources would be greatly appreciated.
Thank you in advance for your help!