Professional > Data management scripting > Working with UNICOM Intelligence Interviewer - Server data > Filtering on the interview status
 
Filtering on the interview status
When data is collected using UNICOM Intelligence Interviewer - Server, the DataCollection.Status system variable (see System variables) stores information about the status of the interview. DataCollection.Status is a multiple response variable that has the following categories:
Category name
Description
Completed
The respondent completed the interview.
Active
The interview is in progress.
TimedOut
The interview timed out, for example, because the respondent lost their connection or went to another page.
ScriptStopped
The interview was stopped by the script.
RespondentStopped
The interview was stopped by the respondent.
Shutdown
The interview was stopped because the interview system shut down.
Signal
The interview was terminated by the signal keyword.
Test
The data was collected when the questionnaire was being tested.
Reviewed
This category counts interviews that have been reviewed by replaying them.
You can use this variable to filter the case data records according to the interview status. You do this by setting up a WHERE clause in the select query in the InputDataSource section. For example, if you want to restrict the export to data that comes from completed “real” (that is, not test) interviews, you could use the following:
SelectQuery = "SELECT * FROM vdata _
  WHERE (ContainsAny(DataCollection.Status, {completed})) _
  AND NOT (DataCollection.Status >= {test})"
Because it is common to analyze only completed “real” interview data, this filter is in most of the DMS sample files that are designed for use with mrIntervew. However, you can easily change the filter. For example, to include timed out interviews as well as completed ones, change the WHERE clause to:
SelectQuery = "SELECT * FROM vdata _
  WHERE (ContainsAny(DataCollection.Status, {completed, timedout})) _
  AND NOT (DataCollection.Status >= {test})"
If you want to include all of the data regardless of its interview status, you would remove the WHERE clause or replace it, as required.
See also
Working with UNICOM Intelligence Interviewer - Server data