This sample demonstrates a way to validate the surveyor's Location against a predefined location of the selected city.
The general logic is this:
- The surveyor chooses a Location from the displayed PSU list.
- If the survey is conducted on an Android device, then question Q_2 will be displayed to the respondent, and the current Location will be auto-captured by the device.
- If the survey is not conducted on an Android device, then question Q_3 will be displayed to the respondent, and the respondent will have to fill the current Location manually.
- The logic is placed in the Start Script Q_4. Once there is a valid GPS location, the code compares the captured Location and the predefined Location of the selected PSU, and checks if the "current location" is inside the PSU or not, and will display the needed message to the surveyor.
For your reference, the Polygon locations on a Map(each Location represented by the Location_Name), we added a few types of polygons(triangle, square, etc.)
To import the attached SRV file, follow this link: http://support.dooblo.net/entries/22388573-How-to-import-a-survey
The predefined PSUs can be found in the attached excel file. This file needs to be imported to the studio as an additional data list and be attached to the survey. Please follow this link to learn more about additional data lists and subject stores: http://support.dooblo.net/entries/22793802-How-to-use-an-excel-file-as-a-data-list-in-a-survey