Is there a projected timeline when file attachments will be available in the inbox as well? I currently don't have the ability to change the field type, put it in a repeat or add an additional question (the inbox is one small portion of a large multi-user interactive process involving the web app, dashboards, view layers, submission urls, etc.), but I really need my inbox users to be able to see previously submitted attachments and add additional attachments to a multiline "file" question. As far as I understand there is no way to do this right now without changing the field type or adding an additional field?
Hello @GIS_utahDEM,
The ability to access file attachments in the Inbox is still in our backlog and we don't have a timeline at the moment. As a workaround to access existing file attachments a JavaScript function can be used to query the queryAttachments endpoint and return the URL for the file attachment. That URL can then be used as a hyperlink in a note question so the user can download the attachment on their device. Please see the sample below for reference (all that needs to be updated is the REST URL's in the JS file).
@ZacharySutherby Thanks so much for your response! I am not very experienced with javascript so I'm unfortunately still having some issues:
I have copied the code and survey fields over, and I am able to publish -- but when I go into the field app and try to click "Access Attachment" it says I'll need a new app to open the qrc link. I'm guessing (I could be completely wrong) that it has something to do with the URL and the id field that I swapped to. I don't have inc_id so instead I used my case_number field which is a text field with no restrictions. I swapped inc_id in line 15 (let where = "where=inc_id="+"'"+incid+"'";) to case_number, and I swapped the layerURL for my feature layer. Another thing that may be weird is that my survey has a submission URL which is pointing at a view layer of another hosted feature layer (which was created by a survey) -- not sure if that would affect anything.
Appreciate any insight you have!!
Hello @GIS_utahDEM,
When you modified the JS file did you update both the queryfl() function and the query_attach() function? If so if you make the question that runs the JS function a note question does it return a URL? Ex.
@ZacharySutherby Yes, I was able to swap both URLs.
I am including a screenshot of what I see when I click the "Access Attachment" link. I am unable to right click it or inspect in any other way as far as I can tell.
I am also including a screenshot from my survey123 connect and the .js file that I'm referencing
Are there any updates on a timeline for this functionality?
G'day Zach!
How would this work for multiple file questions in the one survey?
If I click on attachments in the table view in AGOL, the popup shows all attachments.
Thanks heaps
Have you seen my suggestion near the end of this thread? If you have multiple file questions, I think my solution would work. I'm not familiar with Zach's idea, so I can't be much help there.
G'day Todd
I tried Zach's first, as it was, well, first 🙂
Looks like I will run with your approach due to the multiple file questions.
Though now my time questions validation fail.
Out of scope for here and I think known not supported in the browser 😢
PS Neat trick with the GlobalID
Thanks
Hello @GIS_utahDEM,
If you switch the query_attach question from a calculate to a note or text question when you are in the Inbox does that display a URL?