I'm working on a site inspection survey for over 3000 sites and an important aspect is including a site photo from a previous inspection. I have a feature layer of all the assessment points on AGO and they have a photo attached to each point.
I was hoping to link the feature layer to the survey using the unique Site ID, so when the user enters the site ID the survey pulls the attachment from that point into the survey. Can this be done? Any help would be greatly appreciated.
Thanks! Darren
I've tried using pulldata('@layer', FeatureServiceURL, 'attachments', 'Site_ID', ${SiteID}) but nothing appears in the image field. Both the survey and the feature layer are shared with the same group so there shouldnt be any permission issues.
Hi @DarrenSchouls - try this method with the attached example.
1) Create a calculated field with a js function (myData.js) to lookup the previous event for the site (in the example case - the "site" is sample_point_guid which we use to get a list of all inspections with that guid, sorted by a field that would get you the most recent. In the js, use queryAttachments syntax to return an attachment URL.
2) Add a note field with the link to the attachment