how do you open attachments entered in a form builder form

I have created a form in form builder with the attachment field type.

I have tested it and output the dataset into a table with an ETL

The File names show but I do not know how I would go about being able to open or view the files.

How is the Attachment field type intended to be used and attachments viewed after submission?

Best Answer

Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷

    We have form builder, but haven't used the attachment feature yet. I just played around with it and I don't see how you are supposed to view attachments. I see a documentid column, but it is unclear what url you might add that to in order to view the uploaded document. I will be curious as to what the answer is for this.




    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • DanielShurina690
    edited April 8

    Found the Attachment URL by copying it out of the form where the files are attached and tried to use a formula to create a new URL hyperlink : 

    CONCAT('<a href="', 'https://dd887eca-92df-4ec2-b11a-aaa73998b7ff.domoapps.prod4.domo.com/domo/data-files/v1/', `Value`,'" target="_blank">', `Value`, '</a>')

    This fed the File name into the URL instead of the File ID number which resulted in an error.

    So I had to alter the Concatenation to put the File ID Number into the URL.

    which required a group by Label and Submission ID with a formula to grab the Form ID number from the value collum "if( `Value`REGEXP '^[0-9]+$',`Value`,Null)" and the File name .


  • the Number value was fed into the URL and the File Name was left as the Target

    CONCAT('<a href="', 'https://dd887eca-92df-4ec2-b11a-aaa73998b7ff.domoapps.prod4.domo.com/domo/data-files/v1/', `Hyp Test Num`,'" target="_blank">', `Value`, '</a>')

    Resulting in a functional link in the Card with the file name that opens the file.

    I believe this is solved until DOMO creates a better solution.

    thankyou MarkSnodgrass for your feedback!

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷

    @DanielShurina690 great job figuring that out. How did you determine your base URL? https://dd887...

    It seems like that might be different for every Domo instance and it's not clear what that is based on.




    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷

    Makes sense. So the base url is specific to the form that was created.

    For everyone's benefit out there, it is easiest to do a test entry and attach a file and then copy the URL that is being used for that form and then the final number at the end is the file id, which is stored as a value when the form is submitted. Use this combination to construct a URL that will download the document when viewing the responses in a table card.




    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.