I'm trying to symbolize a feature based on a survey123 attachment. I want to symbolize the feature based on a related table field, such as the completion/inspection date of the survey (so the feature would be symbolized based on a given timeframe). I also want it to use the "newest" survey to do this symbology. A feature is going to have multiple records of the surveys as attachments but I'd like to use the most recently completed survey to show where inspections have been done and where they haven't, essentially "overriding" the previous survey. Is this possible?
I have been struggling with this exact question for some time. The solution that we are now running with may be of use if you haven't already solved this some other way.
Apart from those issues, this is working OK us so far.
The map is visible in Collector, and I can see which sites have been surveyed recently, and which are due for a survey, simply by the symbology. The symbology should automatically update for the latest submitted survey data according to a configured refresh interval (if online) - however, I can't test this on my old version of Collector and my old iPad can't run the newer versions (it certainly works on that same map in the web browser). For my old version of Collector, I can manually refresh the map to see the symbology update (switch to another map and then back again).
I can tap on an asset feature on the map, and in the pop-up, there is a link that I can tap on to automatically create a new survey for that feature in Survey123 with some fields already pre-populated (eg, AssetID).
Here's how I'm doing this:
SELECT LastSurveyCaptureDate, DATEDIFF(day, LastSurveyCaptureDate, CURRENT_TIMESTAMP) AS DaysSinceLastSurvey, asset.*
FROM [GIS_Ops].[gisadmin].[ASSET_EVW] AS asset
LEFT OUTER JOIN
(SELECT [Site], MAX(CaptureDate) AS LastSurveyCaptureDate
GROUP BY Site) AS survey
ON asset.AssetID = survey.AssetID
We are only in the early stages of running with this solution, but it's working OK so far.
(Note that I've used asset inspections as an example in the description above, but in reality, I'm using this technique for water quality testing at fixed testing sites, not for asset inspections. I just figured that asset inspections is something people are more likely to be able to relate to. If the operators are happy with this for water testing for a few months, I plan to implement similar solutions for meter reading and for compliance audits.)