Location Question

Overview

SurveyToGo now has a location question – a type of question which allows the interviewer to capture his GPS location manually through a given question or let him choose a location from a map.
This how-to will introduce you to this new type of question, in a few simple steps:

  • Step 1: Adding a location question
  • Step 2: Configuring the location question
  • Step 3: Viewing the captured data.
  • Step 4: The question different tabs

Step 1: Adding a location question

First, add a new question and set it to be a location question type.

Then, this is how the question will look like on the device:


By clicking the ‘Capture GPS’ button, it would capture the current location according to the GPS readings of the device, this data will be available as this questions answer – in addition to the automatically captured latitude & longitude for each interview.

Step 2: Configuring the location question

Under the questions ‘Answer’ tab, you can find the two possible configuration for this type of question.

Option 1 – ‘Set location as interview location’:
This will replace the Latitude & Longitude that were captured automatically for the interview, with the location captured in this particular question.

Option 2 – ‘Let user select from map’:
This feature is enabled only if having a valid internet\Wi-Fi connection.
It will open Google Maps, and will allow the surveyor to select a location for this question directly from the map, by just clicking on it.

This is how it would look on the device:

Step 3: Viewing the captured data.

Now, we can see our captured data within this interview through the operations console

Please note: you can set predefined locations on the map by using the function CreateMapMarker(). This can be used to help the surveyor with the location is he is at. 

For example adding 2 locations called 'KSP' and 'Japanika' that will be shown on the map when surveyor will open it as follows:

function OnMapShowing(inCallback, inQuestionIndex, inIteration){
inCallback.AddMarker(CreateMapMarker(CreateCoords(32.1746225,34.9264295),"KSP"));
inCallback.AddMarker(CreateMapMarker(CreateCoords(32.170772, 34.928223),"Japanika"));
inCallback.setZoomLevel(8);
}

Step 4: The question different tabs

Question's Node

Under the Survey Tree, this is how the Question Node looks like.


The Tab's

Each question has a set of tabs; each tab is used for different configurations – let's go over the tab's.

The View Tab

In the view tab you can configure the basic components of a question, such as its body text and its answers.

Question Type & General Settings

In the main panel, you can set the questions type, its textual color and formatting.

In the bottom panel, you can Clear the questions content, add a new question of the same type right after the current one and quickly navigate between questions:

The 'Question' Tab

Under the question's tab, within the View tab, you can define the Questions Body Text and the surveyors instructions if any.

Defining The Questions Text

The text written in the question's tab box is the body text that will be displayed to the surveyor.

The surveyor instruction box, allows you to configure textual instructions for the surveyor that will be formatted differently than the body text.


For Example:

Here I configured my body text to be:

"Capture your location"
* (This is the default view, it can be also configured to have a map and let the user choose a location)

The 'Answers' Tab

The answer's tab allows you to define the question's answer properties:

  • Type
    • Retrieve GPS Location: Will show a button to 'retrieve location' from the system.
    • Allow selection of from map: Opens Google maps and allows the surveyor to choose a location on the map and capture it's location.
    • Display read-only map: Same as previous option but will display a read only map on which you can set predefined pinpoints.

Screenshot_1.png

The Rules Tab

In the rules tab you can define Entrance Rules, Validation Rules and Branching rules.


For more detail please see the following tutorials and refer to the scripting guide:

Survey Logic Video Series

How to create Entrance Rules

How to create Validation Rules

How to create Branching Rules

The Scripts Tab

In the Script's tab you can define your questions Start Script, End Script and enter the advanced scripts for defining more complex functions.

For more detail about Start, End and Advanced scripts, please see the following tutorials and refer to the scripting guide:

How to create Start\End Scripts

How To use functions across a script using the Advanced Scripts section

The Variables Tab

The Variables Tab is used for configuring variable related properties of a question.

  • Variable Name: is the name of the column representing this question when exporting.
  • Missing Value: is the value that this question will get if it was not answered or skipped.
  • Short ID: Is a short name that is used for ease of readability and is viewable in the Survey Tree next to the Question Index – Short ID's can also be used as a basis for variable names, please see: How to work with QRef's & Short ID's

Variable names can be referenced instead of Indexes by using the correct functions. (Basic Introduction to using VRef and VarName)

The Advanced Tab

The advanced tab allows you to set & configure more advanced properties of a question.

Common usages of the advanced tab:

  • Hiding a question from the surveyor.
  • Allowing\Disallowing 'No Answer':
  • Configuration of Answer Properties, Attachments and Image Properties:

Variables and Exporting Definitions

Location questions export as two different columns, one for the latitude of the captured location and the other for the longitude of the captured location.

Related Links

For more functions please see the scripting guide and function library: Function Documentation

 

That's It !

Visit us at: http://www.dooblo.net

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.