Professional > Interview scripting > Sample management > Sample management facilities > Standard scripts > Scripts in the UNICOM Intelligence Sample Management folder
 
Scripts in the UNICOM Intelligence Sample Management folder
Basic\basic_sample.mrs
This script is suitable for surveys in which a sample record already exists for each respondent and in which respondents cannot respond to the interview after they have completed it.
This script requires a sample record field called Serial to be mapped to a column in the sample table.
AuthenticateSampleRec rejects respondents whose authentication fields do not match a record in the sample table and respondents who are in the sample table but who are in the COMPLETED queue. In other words, the only respondents it accepts are those who are in the sample table but who have not already completed the interview.
ReturnSampleRec moves the sample record into the COMPLETED, STOPPED, TIMED_OUT, and UNUSABLE queues on the basis of the standard SampleRecReturnCode values of 1 (Completed) or 10 (Reviewed), 2 (Stopped), 2 (Stopped) and the TimedOut interview property, and 7 (FailedScreener) or 34 (RejectedByReviewer). When other SampleRecReturnCode values are used in the interview script, the record is moved into a queue with the name SIGNAL_n, where n is the value of the SampleRecReturnCode.
ReturnSampleRec saves the respondent's serial number in the sample table for use if the respondent restarts the interview. AuthenticateSampleRec passes the serial number in the sample table to UNICOM Intelligence Interviewer - Server for interviews that are restarted. UNICOM Intelligence Interviewer - Server assigns a new serial number to new interviews.
basic_sample.mrs uses the same include files as multimode1_sample.mrs (Constants.mrs, MainFunctions.mrs, and HelperFunctions.mrs). The #define INCLUDE_TELEPHONE property is used to remove script parts that are not useful for Web-only interviewing.
basic_sample.mrs is a pared-down version of multimode1_sample.mrs. Customization opportunities include the following, and are described in Scripts in the CATI folder.
HandleSpecificRequests_ClientSpecific
RejectRecord_ClientSpecific - OverQuota reason but not Expired reason
UseThisSampleRecForWeb_ClientSpecific
AuthenticateSampleRec_ClientSpecific
ReturnSampleRec_DCCodes_ClientSpecific
ReturnSampleRec_ClientCodes_ClientSpecific
Personal\personal_sample.mrs
This script is suitable for personal face to face interviews conducted by interviewers in homes or other locations.
personal_sample.mrs uses the same include files as multimode1_sample.mrs (Constants.mrs, MainFunctions.mrs, and HelperFunctions.mrs). The #define INCLUDE_TELEPHONE property is defined for personal and telephone interviewing to support sharing script with phone interviewing.
personal_sample.mrs is a pared-down version of multimode1_sample.mrs. Customization opportunities include the following, and are described in Scripts in the CATI folder.
HandleSpecificRequests_ClientSpecific
RejectRecord_ClientSpecific
UseThisSampleRecForPersonal_ClientSpecific
UseThisSampleRecForWeb_ClientSpecific
AuthenticateSampleRec_ClientSpecific
IncrementTries_ClientSpecific (present but not used)
ReturnSampleRec_ClientCodes_ClientSpecific
ReturnSampleRec_DCCodes_ClientSpecific
GetCATIParamDefault_ClientSpecific (present but not used)
HTTP Variables\httpvar_sample.mrs
This script is designed for use with the sample httpvar.asp pre-authentication page, which collects HTTP variable values. This script requires various sample record fields to be mapped to columns in the sample table — Serial, Language, Browser, Server_Name, http_cookie, Remote_Address — in addition to the standard required fields.
Sample Fields\smvar_sample.mrs
This script provides an example of a sample management script that can be used to extract information from the sample record for use in the interview, and to pass back data for storing in the sample record.
addrandom_sample.mrs
This script can be used to create sample records for testing. It is designed for use in a project that has one authentication field — Id — and an authentication page that does not collect the ID. AuthenticateSampleRec generates an ID for the sample record using the RandomPassword function and adds the record to the sample table. This script does not handle the serial number for restarting interviews. When starting an interview in a project that uses this script, you need to pass the Id authentication field as a virtual parameter on the URL to force auto-authentication to take place. You can use this script to load test your sample management script.
addrecord_sample.mrs
This script can be used to authenticate if an existing Id is provided or add records if the Id is not found. The authentication rules are:
If the Id is not included on the URL, the authentication page is displayed so that the respondent can enter their Id.
If an existing Id is included on the URL, authentication occurs automatically and the survey is started.
If the Id on the URL is not in the sample table, a new record with that Id is added.
If the Url includes Id=AddMe, an Id is randomly generated, and a new record with that Id is added to the sample table.
repeat_sample.mrs
This script is similar to the basic_sample.mrs script except that it accepts respondents who have already completed the interview.
See also
Standard scripts