Help

Re: How to make a master-detail form/view?

1722 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Rory_Kingan
4 - Data Explorer
4 - Data Explorer

Newbie question: how do I make a form or view where I see one row in the ‘master’ table, e.g. Order, and I see all the associated records in the ‘detail’ table, e.g. Order Line?

I found this feature request from a couple of years ago but I’m hoping Airtable now has some way to do this fundamental way of looking at data?

In my particular case I’d like users to be able to browse through records in my ‘master’ table, seeing a handful of fields in the selected master record, and see a tabular display of the associated records in the detail table. I’ll have a couple of buttons (or similar) allowing them to perform actions on the master record they’re currently viewing (e.g. Approve, Reject, triggering a script block to run for that record).

thanks,

Rory

3 Replies 3
Matthew_Thomas
7 - App Architect
7 - App Architect

If I’m reading your post, and the one you linked to, correctly, I think this can be easily done by expanding a record in your “master” table and then clicking on any linked records that you like. This can be done many layers deep, so you should be able to drill down as far as you’d like.

You can read more information in the documentation

And here are some example screenshots to help show this using one of the starter bases.
Screen Shot 2020-05-27 at 1.32.36 PM Screen Shot 2020-05-27 at 1.32.42 PM


If this answers your question, please consider marking it as “solution”. If not, I’m happy to work with you further. Thanks!

But how can this be done in a form? (part of the OP question)

I’d like to send an order form to customers that they fill in. They’ll need to populate the form with their name from the customers table and the line items of the order form with products they select from the products table, add a quantity and have the form calculate the line total and the overall order total. The order data (date, customer #, order total) will be stored in the order table and the line item data (order #, product #, qty, line total) will be stored in the order items table. I’ve searched the help and forum and it appears that a form can only be used to populate fields in one table. Sorry if I missed it. Also, what’s the point of having a relational database if you don’t allow the end user to make use of the proper relations? Is there a way to send a more complex grid view to customers to have them fill in orders and line items?

Moe
10 - Mercury
10 - Mercury

We’ve built a solution for this exact problem. Our form lets you add line items from a different table and link them to the order.