How to add an attachment description to file uploads?

I am trying to find a way to allow the user to include an Attachment Description that goes in the Attachment object "Description" field when using the file upload component. I don't see a way to do any Actions on a file upload to add it. Has anyone figured out a way to do this?

Comments

  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Jarrod,

    We use a table on the Attachment Object just below the file upload component, with a "description" column. When the user uploads a file, it shows up as the first row in the table, and the description can be edited.

    image

  • Pat VachonPat Vachon ✭✭
    edited June 25
    How about an action in the attachment model that shows a popup with the description. You'd use two models to make this happen. You follow?
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    I like it. When a new row is created in the attachment model, trigger the popup with a field for the description.

    But why do you need two models?


  • Pat VachonPat Vachon ✭✭
    edited January 2016
    To isolate the new attachment as one row. Don't think you can only show the new record otherwise.
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    Ah, I see.

    Can users edit the data that templates pull in with merge syntax? I thought that was possible. If so, could you use a template with {{$Model.Attachments.data.0.Description}} instead of two models and a field editor?

    Probably more complicated than it's worth.
  • edited January 2015
    How do you add an Action to the File Upload Component?
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    Jarrod,

    Pat is describing an action on the attachment model, not the file upload component.

    You should have two models on your page (or three, with Pat's method). One on the object that has the record you are attaching to; and one (or two) on the Attachments Object, with a condition linking it to the first model.

    Makes sense?
  • edited January 2015
    i get how to load a list of them but how do you relate the upload component to the single record attachment model? once you upload the file it saves it and there is no handle to the attachment it creates.
  • Pat VachonPat Vachon ✭✭
    edited January 2016
    er ... uh .... nvm. I forgot that the file component doesn't work based on an attachment model. It works based on pointing at the parent model. :D
  • edited January 2015
    I got it! ;) VisualForce.... lolimageimage
  • Pat VachonPat Vachon ✭✭
    edited January 2016
    I'm confused. What were trying to do. Just list the attachments?
  • edited January 2015
    No, That plus add an attachment with a description. I made a quick upload page that uses a drop down for description for the file upload. The list with skuid is easy but there needs to be a way to upload a file with the description not just the file.
  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    Well Ill be danged. Pat's idea should work,  but there is a bug with the file component.  It adds a row to the attachments model, but doesn't trigger model actions..   We need to fix that. 
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    Jarrod,

    I really think Skuid can do what you're asking. We've done it. If you're happy with your visualforce solution, that's great. If you want a complete sample/description, let me know.
  • Pat VachonPat Vachon ✭✭
    edited January 2016
    I'd be interested just because I'd like to see how. ;)
  • edited January 2015
    If you have a working sample that would be great! I couldn't get anything streamlined to work that didn't involve adding, refreshing, editing and then saving.
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    So, here's what we're using. The only step I've eliminated is 'refreshing.' I still have to upload, edit, and save. Using a popup like Pat suggested would be an even better user experience, once the Skuid team get's the model actions working properly.






    I will mention that this 'patient' is completely fictional. We're not violating anyone's privacy.
  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    Jim that's cool - but I don't think it gets to what we want.  The table with description in it is cool,  but does not force the user to enter a description.  Still working on this one.. 
  • Matt SonesMatt Sones ✭✭
    edited December 2016
    Right. Pat's idea to launch a popup on creation of a new row seems like the way to go.
  • Matt SonesMatt Sones ✭✭
    edited February 2017
    Rob (et al.),

    Any movement on this?

    I'd love to see the model on the Attachments object be able to trigger actions in the action framework upon creation of a new row. 

  • Rob HatchRob Hatch 🛠️ 
    edited September 2016
    Yes Matt, it is still on the list, but other cool toys have gotten more priority.  You know how it goes. 
  • edited July 2016
    @Rob Hatch, Any update on this enhancement ?
  • edited July 2016
    Anyone, any update on this enhancement from skuid?
  • Anna WiersemaAnna Wiersema 🛠️ 
    edited December 2019
    The 'add an attachment description' to file uploads is enacted, as of Skuid Banzai you can set an attachment description in File Upload component properties  (see Step 2 in that article).   The Attachments Model also seems to be connected to the Actions Framework via Model Actions, but I haven't done much with this yet so I'm not sure if there are limitations.
  • edited January 2016
    For community users, the attachment description or filename is not getting updated.
    Can someone help me fix this issue or confirm if its a bug?
    @Rob Hatch
  • edited January 2016
    Hi Rob,

    For community users, the attachment description or filename is not getting updated while using the file upload component.
    Can you help me fix this issue?


Sign In or Register to comment.