Hi,
I am creating a survey to assist with environmental regulatory compliance for my client. I would like for survey users to be able to select their location and have the Hydrologic Unit Code (HUC) associated with that area autofill. For example, for the yellow point in the area shown below I want to have 020801060401 automatically fill in a separate field.
I know that I can reference the X,Y points from the Geopoint type using the pulldata() function (using pulldata("@geopoint", ${location}, "x"). Is it possible to then intersect that point with another feature service and put the HUC value into my survey?
Thanks in advance.
Hi Linnea
Using spatial inheritance to populate surveys based on information from another layer is not currently supported in Survey123 out of the box. However, we have added support for custom JavaScript functions (this functionality currently is in beta) and you could use this to achieve what you are wanting to do. Essentially you would need to write a script that would take the survey location and use it to do a spatial query against your HUC layer. Please take a look at the following resource for more information on this functionality: Welcome to our Feedback Community. Of course, some JavaScript skills would be required to implement this.
Thanks
John