Customizing the GPS question
The GPS question includes several properties that support customization.
Response required
The GPS question's Response required option is selected by default. This means that the GPS question cannot be passed until the GPS position information has been captured. Deselecting this option allows the interview to continue even if the position information cannot be captured.
AcceptOnlyGPSBasedLocation
The AcceptOnlyGPSBasedLocation parameter is set to True by default, which forces the question to accept only positions that include altitude along with latitude and longitude. Set the value to False to support devices that cannot deliver altitude information (including WiFi positioning).
AutoSubmitGPSQuestion
The AutoSubmitGPSQuestion parameter is set to True by default, which displays the GPS Location page with a success or failure message that the interviewer must dismiss before continuing. Setting the parameter to False submits the page for the interviewer. Setting this option toFalse also makes it impossible to pass the GPS question with the Back button. This parameter should be used as only the first or last interview question.
GPSQuestion.Response.Value
If the GPS question is re-asked during a survey (by moving back in the survey and then forward), the GPS location information will not be recaptured unless the response is set to empty before re-asking the question. Set GPSQuestion.Response.Value = "" where GPSQuestion is the GPS question name in the script item. This setting forces the GPS question to capture new coordinates when re-asked.
.Value can be omitted from the setting as it is often automatically removed after saving and reopening the MDD file (the GPSQuestion.Response setting is the same as GPSQuestion.Response.Value.
Setting the properties
Each of the properties can be set in the script item that is inserted by the GPS question library item. The GPS library item includes status and error message information (currently in English). The status and error messages are contained in the GPSTexts block that is available in the UNICOM Intelligence Professional Metadata pane. The message text can be translated as part of the interview. If the GPS question is used regularly, it might save translation costs to translate these texts in the source metadata file. Refer to the UNICOM Intelligence Developer Documentation Library for a description of the UNICOM Intelligence Professional wizard files and locations.
The default reporting script depends on the GPS question being named GPSQuestion. Therefore, do not change the name of the GPS question if the reporting script will be used.
The GPS library item adds a Location helper field to the GPS question. The Location question can be used to store the human-readable location address. The example reporting script contains an example of how to populate the Location helper field.
When UNICOM Intelligence Professional is used for scripting, rather than Author, the Author wizard source .mdd file is recommended as the source for Professional scripting. Open the GPS.mdd file from [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\Author\Library\Questions\Question Types, and then copy the metadata and routing sections into the appropriate Professional panes.
See also