Proximity based Question

622
1
10-05-2018 11:36 AM
LarryWiebe
Occasional Contributor

Hi Survey123ers,

I don't think this is there yet, but I would like to have the functionality to create a question that is answered by hitting a button to retrieve the attribute from the closest feature that the question has been configured for. 

Here is my real world example:  I am out in the field inspecting transmission towers.  I would like to retrieve data using pulldata on the tower that I am closest to.  This could be a simple question that I hit a button on to retrieve the closest tower, then I can use pulldata to populate my other answers.  I have done this using collector in the past, where the user launches the survey from Collector using the URL scheme to open the correct tower for inspection, but the maintenance of a Collector configuration is overkill for something quite simple.  I have also used Inbox to take data out to the field, and the Survey123 Map to get to the correct tower and fill out the survey, but the limitation/workaround to collect photos on an Inbox survey is a bit cumbersome in backend data processing. 

This could be a new appearance on a text control that places an icon button next to the text box for getting the value based on your current location.  Then using the calculate or default to go get the value from a simple configuration similar to an external CSV with lat/long and the feature value to return.  The trick may be that in out network we have 20,000 towers and would it work on that size of external dataset.  If not, the towers could be split into regions to get the datasets to a more manageable size.

Thanks,

Larry

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi Larry,

Just came across this post and realised it was not answered earlier in the year. Having a think about your workflow and enhancement request, I think the best way to achieve this in the current version of Survey123 would be to use a custom JavaScript function. You could write a function that performs the query you want, and returns a value back into a text question (or multiple values). Depending on where the data is that you are querying (online hosted feature service) they the device will need to be online for this to work.

You can find out more information about custom JavaScript functions using pulldata() in Survey123 here: https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm

And more information in this great blog post: https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js-f...

Regards,

Phil.

0 Kudos