For some reason I can’t get my head around this today. I have a list block from one table. I want to click through (or use button) from that list and open a detail block for a record in another table, based on a value in the list record.
So say list has fields ItemID and Month in the table ‘products’ - when I click on it, it shows be a detail page for the record in the inventory table that has the same ItemID and Month. If the record doesn’t exist then it offers to create it.
I’m guessing that I’m looking at a workflow - or could this be done with standard blocks?
Hi @Bitstreams
If I understood your use case correctly, all you need is to use linked lists concept. Here is how:
- In the details page, have an item details block on the top that is mapped to the “Products” table and grabs the record ID from the URL (Filter records by Record ID in the page URL), but make that block empty, without any fields and buttons, so that it just appears as an empty space on the top.
- Then add another item details block below it mapped to the table “Inventory”, select the radio that stands for “Conditions” (Filter records by), and set these conditions to that block - if ItemID is any of/includes any of/contains Current Record’s ItemID and if Month is any of/includes any of/contains Current Record’s Month.
- Now on that block you would show all the fields and buttons that you need, and you would also add an empty state message with something like “There are no records, create one”, so that if there is no related record for the clicked one, it shows that message.
Hope this helps.
As ever David, you solved that. It works nicely - thanks so much.