void OnSurveyQCFlagChanged(IQCSurveyFlags inFlags);
Description
This callback will be called when a Quality Control flag is set. If a given flag is set, the inFlags.<flag> will return true. This callback can be used to set custom fields in the script or to automatically cancel the interview.
Parameters
The following is a list of parameters the functions receives
Parameter | Type | Description |
---|---|---|
inFlags | IQCSurveyFlags | the Boolean value of all Quality Control flags at the time the function is called |
The flag updates are divided into 4 categories:
- Survey Start - those that are set right at the start of the interview
- Mid Survey - those that are set immediately when they are violated
- Survey Save - those that are set when the interview is saved (either by auto-save, script, or manually)
- Survey End - those set after the interview is completed, and so do not trigger the callback unless the subject is re-entered after submitting.
Category | Type |
---|---|
Survey Start |
|
Mid Survey |
|
Survey Save |
|
Survey End
|
|
Return Type
void
Example
function OnSurveyQCFlagChanged(inFlags)
{
if(inFlags.ByGPSServicesOff)
{
SetInterviewExtraField(eInterviewExtraField.CustomData1, "GPS services are turned off.");
}
if(inFlags.ByScript)
{
ExecutionMgr.CancelSubject();
}
}
Comments
Please sign in to leave a comment.