Filter drop down on add new record form from a table component

SO Im stuck onim stuck on another issue, I have a detail page with a table that shows realetd records. I added the option to add a new receipts line record. on that form Im trying, and cant figure it out, to filter one drop down based on two values from the parent record. sample, I have a facility table a client table and an items table, recipt table and lastly a receipt line table. on the form i have an item drop down. I need to filter that item by facility and then client based on the parent record receipts. no matter what fields for facility and customer i put on the form, it wont filter, it either shows no records or all records.

i also dont want ot have to select facility and then customer. ialready have those in the parent record.

The best way that I have found to work around what you are attempting to do is to have both select fields on the form and then apply the CSS class of hide to both of them.

The best way that I have found to work around what you are attempting to do is to have both select fields on the form and then apply the CSS class of hide to both of them.

Then add a row to the pop-up window or on the page (not in the form itself) and apply a details component that has both of the fields that would populate the select fields in the form.

of the fields that would populate the select fields in the form.

In the details field of each of them, click the option to save as local browser session. Give them a name and save them.

Give them a name and save them.

Then work with ChatGPT to create JavaScript code that reads the local browser session of each of the names that you assigned the details with. The JavaScript will then auto populate both select fields that you will not have to manually populate.

It will take a little bit of work with ChatGPT to get the JavaScript to work, but I’ve been successful in doing that. Even with both select fields having the “hide” class being assigned to them, the JavaScript will still auto populate them with the appropriate local browser session values.

Hello SafetyUniversity, thanks for the pointer. I got it to work but you were right with it took a bit of work with chatGPT. after 5 hours and 300 lines of code it all works fine. I’ll have to this again on five other pages but I think changing the field names on the code will work. Maybe Tadabase devs can build a snipet to accomplish this. Now how to keep the pop up from closing when save is clicked, only close when user clicks close. they could be entering sevela lines and it could get annoying having to keep opening the form to add a new record if they have to enter 20 lines.

Thanks again.