Select to view content in your preferred language

Using pulldata to retrieve attachments from feature layer

306
2
02-01-2024 01:31 AM
AnsonHui1
New Contributor

Hi, I am trying to create an inspection survey where users first answer a geopoint question about the property they are at, then using pulldata() functions to query (point in polygon) and auto-populate questions regarding the property (ID, address, etc.). I have already gotten this part to work. However, I also want to retrieve an attachment (image) from the feature and display it in the survey for the users to reference or annotate during the inspection.

So far, from all the documentation and blog posts I've seen, it seems like this is impossible. Can anyone advise if this is a fruitless endeavor or is it possible? Any help would be greatly appreciated!

Tags (2)
0 Kudos
2 Replies
abureaux
MVP Regular Contributor

I haven't gotten this to work yet. Though in all honesty, I have tried that hard yet.

0 Kudos
JJ_Reyes
Occasional Contributor

Pulldata @layer won't be able to pull attachments as its using query and not queryAttachments.

@AnsonHui1 - in your case, you might benefit from Pulldata @javascript with the code found in this post - inbox_files.zip

Make sure to check the attachment type you are querying. That seemed to throw me an error. In my case, I passed the GlobalID of the feature I wanted to query from the survey and only needed to use the function "query_attach" from the post's example script.

0 Kudos