file upload in drawer refreshes only first record

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a drawer on a case model that has a table to the attachment object (another model) and a file upload component.  When I attach a file associated with the first record, the table refreshes and displays the name of the attached file.  When I attempt the same operation on subsequent records in other drawers, the table does not refresh.  When I view the cases, all associated attachments were made regardless of drawers.  Again, it just doesn't update the tables in drawers except for the first record.  (Hope that makes sense.)

Any idea on how to resolve this issue? 
Photo of Neville O'Meally

Neville O'Meally

  • 180 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
This post may help. It discusses requery of models in drawers and context:
https://community.skuid.com/skuid/top...
The only other idea that I have which may not work would be to put the table and uploader in a separate page and ten use a page include in the drawer.
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Neville,

Check out this tutorial on drawers and this tutorial on file upload components and see if they help.

Thanks!
Amy
Photo of Neville O'Meally

Neville O'Meally

  • 180 Points 100 badge 2x thumb
My apologies for not reporting that the problem was resolved.  

First, there was an error on my part for not properly configuring the drawer object relationship. The real problem, however, was the dynamic functionality we needed.

The solution was to include the action framework functionality typically included on the "Before Load Actions" of the drawer to the parent icon that opens the drawer.  The framework then fires on each click which includes updating programmable conditions on the model, closing other drawers, re-querying the model, etc.  

Apparently, the "Before Load Actions" on the drawer runs only once.  In our scenario, we are dynamically adding records to the attachment object necessitating the requery...  

Hope that makes sense.

Much thanks for your responses.
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
I'm glad you got it figured out, and thanks for updating the community, Neville!