File Attachment Not Loading Preview

  • 1
  • Question
  • Updated 3 years ago
  • (Edited)
Pulling my hair out!  I have two skuid pages that create cases, attach files to them and gives the user a preview of the files they have uploaded.   1 page previews great and the other doesn't.  Why would the preview table fail on one page and not on the other?  Models and components are identical! Any thoughts on what I should investigate?


The happy page creates a case, lets the user attach a files and displays the name of the file in a table component (as a preview for the user).



Beautiful!


The other page works very similarly, creates a case record, attach a file but the preview table doesn't show the files I am uploading.  The files ARE attaching to the new case but the table is not showing them.  I have carefully compared the models and components and they appear identical.  I cannot find a difference.  

Any thoughts on what could keep this from working correctly??

Process:

  • Create a case from field editor component
  • Action button saves new case model and opens a pop-up 
  • Pop-up has upload component (based on new case model) and table (based on attachment model)
  • Upload component works great!  (saves file to record successfully) Table component on bad page doesn't update with the new file listed.




Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
Hi, Peter.  It sounds like you just need to add an action that re-queries your attachment model. That will refresh the table and add in your uploaded attachment. This is pretty straightforward to achieve on a page title or table action with the actions framework.
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb

Hi Anna,


I do have a query action for the attachment model that occurs right after the new case record is saved but it's still not working.  However, if I create a button that queries the attachment model and press it after uploading a file the preview table loads my file.  It just doesn't do it on it's own.


Peter

Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
My new case model is the same EXCEPT the broken page has a case model with multiple conditions and the working page doesn't have any conditions (that's the biggest difference between the pages).  Both create case records successfully.

My attachment models are identical (with the exception of the name).

My button has the same actions (save new case record, query the attachment model and show the pop-up).

Both pages successfully create a case and attach my uploaded file to the record.

Only the working page will automatically display the name of the file in the table after I upload.  The broken page will do it if I manually click the button I made that queries the model.  

Is there something I can do to force a query after I upload a file??

This works:


This doesn't:
(Edited)
Photo of Emily Davis

Emily Davis, Employee

  • 3,502 Points 3k badge 2x thumb
Peter, were you able to figure out the problem? For your broken page, do you mind sending a list of the conditions on both your Case model and Attachment model? You can post a screenshot or the xml, or you can send it to support@skuidify.com.