In AskiaScript, the interview object is a predefined object that contains all the available information about the interview itself. This variable is in the global scope, so is available everywhere in AskiaScript.
In this topic:
Returns the identifier of the interviewing agent.
Only available during askiaVoice or askiaFace fieldwork, otherwise it returns 0.
Returns a Number.
Interview.AgentID ' => 35
Returns the name of the interviewing agent.
Only available during askiaVoice or askiaFace fieldwork, this proprty otherwise returns an empty string ("").
Returns a String.
Interview.AgentName ' => "Jerome"
Returns the name of the askia application.
The possible values:
Returns a String.
Interview.ApplicationName ' => "designoffline"
Returns the name of the current broker (sample provider).
Returns a String.
Interview.Broker ' => "Askia"
Returns the broker identifier of the current panelist.
Returns a String.
Interview.BrokerPanelId ' => "Askia001"
Returns the Call ID of the current interview.
Only available during askiaVoice or askiaFace fieldwork, otherwise it returns 0.
Returns a Number.
Interview.CallId ' => 123
Indicates the finished date/time of the current interview (eg. EndInterview).
If the current interview is not yet finished, this property returns the time that the last screen was submitted.
This method returns the time with the respondent offset.
Returns a Date.
Interview.EndTime ' => "25/11/2011 18:00:00"
Indicates the finished date/time of the current interview in UTC (Coordinated Universal Time). If the current interview is not yet finished, this property returns the time that the last screen was submitted.
This property returns the time with the UTC offset.
Returns a Date.
Interview.EndTimeUTC ' => "25/11/2011 17:00:00" (Respondent timezone is UTC+1)
Interview.EndTime ' => "25/11/2011 18:00:00"
Returns the list of errors during the interview run-time
Returns Errors.
Interview.Errors.Count ' => 0
Interview.Errors[1].Message ' => "A response is expected for question 'q1'"
Returns the GUID (Global Unique IDentifier) of the current interview.
Interview.GUID ' => "{D2CC3826-F124-460F-8CD7-5D5C4D7B86F2}"
Id of the current interview (eg. IntvwId).
Returns a Number.
Interview.Id ' => 123
Returns the IPAddress of the current interviewer
Returns a String.
Interview.IPAddress ' => "127.0.0.1"
Indicates whether the current interviewing mode is AskiaFace (CAPI, or face),
Returns a Boolean.
Interview.IsFace ' => True
Indicates whether the page being displayed to the respondent is the first page.
Returns a Boolean.
Interview.IsFirstPage ' => true
Indicates whether the page being displayed to the respondent is the last page.
Return a Boolean.
Interview.IsLastPage ' => false
Indicates whether the current interview was started in Brief mode or with the Test flag set.
Returns a Boolean.
Interview.IsTest ' => True
Indicates whether the current interviewing mode is AskiaVoice (CATI or telephony).
Returns a Boolean.
Interview.IsVoice ' => True
Indicates if the current interviewing mode is AskiaWeb (Web).
Returns a Boolean.
Interview.IsWeb ' => False
Returns the secure hash key of the current interview (used in URL) (eg. Password)
Returns a String.
Interview.Key ' => "QWERTYQWERTYQWER" False
Returns the current respondent language.
Returns a Language.
Interview.Language.Id ' => "1036"
Interview.Language.Abbr ' => "FRA"
Interview.Language.Name ' => "French (France)"
Interview.Language.DateFormat ' => "dd/MM/yyyy"
Interview.Language.DecimalSeparator ' => ","
Interview.Language.ThousandSeparator ' => " "
Returns the Last result code to the call or web interview - this is only available in a routing at the end of the survey or on an edit routing
Returns a Number.
Interview.LastResultCode ' => 4 = hang-up
For web interview:
FINISHED => 0
STARTED => 1000
ABANDONED => 1001
QUOTAFULL => 1002
SURVEYOFFLINE => 1003
FINISHED_WITHOUT_SAVING => 1004
SCREENED_OUT => 1005
SPEEDER => 1006
STRAIGHLINING => 1007
Returns the Last sub result code to the call or web interview - this is only available in a routing at the end of the survey or on an edit routing
Returns a Number.
Interview.LastSubResultCode ' => 3
Returns the geographical latitude of the respondent's device.
Returns a Number.
Interview.Latitude ' => 47.3520544
Returns the identifier of the respondent list.
Returns a Number.
Interview.ListId ' => 2
Returns the geographical longitude of the respondent's device.
Returns a Number.
Interview.Longitude ' => 3.3825492
Returns the question (or the list of questions if the quotas are nested) that triggered the out of quota - this is only available in a routing at the end of the survey or on an edit routing.
Returns a collection of questions.
Interview.OutOfQuotaQuestions[1].Shortcut ' => Gender Interview.OutOfQuotaQuestions[1].Value ' => 1 (Male)
Returns the identifier of the current panelist.
Returns a String.
Interview.PanelId ' => 12345b
Returns the position level (as a percentage) of the current interview. It's the same behaviour as the .PercentPosition but the value never decrease so if we go back we keep the highest value
Returns a Number (0-100).
Interview.PercentCompletion ' => 50
Returns the position level (as a percentage) of the current interview.
Returns a Number (0-100).
Note: the .PercentPosition take into account the rest of the questions to ask. The .Progress take into account the rest of the variables to ask and also the previous questions with missing answers.
Interview.PercentPosition ' => 50
Returns the progress level (as a percentage) of the current interview (eg. PrctDone).
Returns a Number (0-100).
Note: the .PercentPosition take into account the rest of the questions to ask. The .Progress take into account the rest of the variables to ask and also the previous questions with missing answers.
Interview.Progress ' => 50
Returns the entire quota tree definition. You need to use .ToString() in order to return it in json format and use it in your script.
Interview.Quota.ToString() ' => the entire quota tree definition in json format
Returns the current respondent scenario.
Returns a String.
Interview.Scenario ' => "client"
Returns the seed of the current interview (unique identifier that is used to provide randomisation).
Returns a Number.
Interview.Seed ' => 123
Could be used in a run an AskiaScript routing in order to control the visibility of the Comments on the screen.
Returns a boolean.
Interview.ShowComments = (Question Has {2}) ' => 123
Could be used in a run an AskiaScript routing in order to control the visibility of the Instructions on the screen.
Returns a boolean.
Interview.ShowInstructions = (Question Has {1}) ' => 123
Indicates the start date/time of the current interview (eg. StartInterview). This property returns the time with the respondent offset.
Returns a Date.
Interview.StartTime ' => "25/11/2011 17:58:00"
Indicates the start date/time of the current interview in UTC (Coordinated Universal Time). This property returns the time with the UTC offset.
Returns a Date.
Interview.StartTimeUTC ' => "25/11/2011 16:58:00" (Respondent timezone is UTC+1)
Interview.StartTime ' => "25/11/2011 17:58:00"
Marks the interview as abandoned. Equivalent to the routing action goto and mark as incomplete. This method is mostly used in conjunction with the GoTo methods.
Returns an Interview.
Interview.GoTo(chapterNotRightPhoneNumber).Abandon(27)
' Example with EndOfSurvey keyword ' Abandon of the interview and go to the end of the survey Interview.GoTo(EndOfSurvey).Abandon(13)
' Example with sub-exit code Interview.Abandon(13, 1)
Returns the time (in seconds) spent on a question, or the total time spent between a range of questions (e.g. InterviewTime).
endQuestion is equal to the startQuestion.Interview.Duration(gender) ' => 2 (seconds)
Interview.Duration(gender, Age) ' => 5 (seconds)
q1 and q2 are inside the same loop
'Line 1. q1 Iteration 1 = 5s 'Line 2. q2 Iteration 1 = 3s 'Line 3. q1 Iteration 2 = 5s 'Line 4. q2 Iteration 2 = 3s 'Line 5. q1 Iteration 3 = 5s 'Line 6. q2 Iteration 3 = 3s
Interview.Duration(q1.Iteration(1)) ' => 5 (seconds) [Line 1] Interview.Duration(q2.Iteration(1)) ' => 3 (seconds) [Line 2] Interview.Duration(q1.FirstIteration, q1.LastIteration) ' => 21 (seconds) [Lines 1 to 5] it doesn't include the last iteration of q2 Interview.Duration(q1.FirstIteration, q2.LastIteration) ' => 24 (seconds) [Lines 1 to 6]
Returns the Operating System (OS) of the AskiaFace device, if the current interviewing mode is AskiaFace. If the interviewing mode is not Face, this method returns an empty string.
Returns a String.
Possible return values are:
"windows" "ios" "android"
Interview.GetFaceOS() ' => "windows" Interview.GetFaceOS() ' => "ios" Interview.GetFaceOS() ' => "android"
Redirects the respondent to the specified question. Equivalent to the routing actions go to and go back to.
Returns an Interview.
This is available only when running R/W scripts, not when evaluating conditions.
Interview.GoTo(q2)
' Example with question inside the loop ' Go to the second iteration of the question inside the loop Interview.GoTo(qInLoop.Iteration(2))
' Example with EndOfSurvey keyword ' Go to the end of the survey Interview.GoTo(EndOfSurvey)
' Go to and abandon
If q1 Has {1} Then
Interview.GoTo(q2).Abandon(3)
EndIf
Changes the language of the current interview. Equivalent to the routing action set language.
Returns the Interview object.
Interview.SetLanguage("FRA")
' Interview.LanguageAbbr ' => "FRA"
' Example with calls chain
Interview.SetLanguage("fra").SetScenario("french")
Interview.SetLanguage("fr-FR")
' Interview.CultureInfo ' => "fr-FR"
' Example with calls chain
Interview.SetLanguage("fr-FR").SetScenario("french")
Redirects the respondent to the specified question. There is no equivelant routing action.
Returns an Interview.
This is available only when running R/W scripts not when evaluating conditions
Interview.SetPosition(q2)
' Example with question inside the loop ' Go to the second iteration of the question inside the loop Interview.SetPosition(qInLoop.Iteration(2))
' Example with EndOfSurvey keyword ' Go to the end of the survey Interview.SetPosition(EndOfSurvey)
Change the scenario of the current interview. Equivalent to the routing action set current version.
Returns the Interview object.
Interview.SetScenario("administrator")
' Example with calls chain
Interview.SetScenario("user").SetLanguage("ENG")
Returns a string which represents the current Interview object (expressed in JSON format).
Returns a String.
' Output in a single line (it's broken in different lines here for readability)
Interview.ToString()
' => {
"id" : 1,
"key" : "QWERTYQWERTYQWER",
"callId" : 1,
"seed" : 1,
"guid" : "{D2CC3826-F124-460F-8CD7-5D5C4D7B86F2}",
"startTime" : "3/25/2011 04:32:07 PM",
"endTime" : "3/25/2011 04:50:07 PM",
"agentId" : 1,
"agentName" : "Jerome",
"isTest" : true,
"mode": "capi",
"capiOS" : "ios",
"progress":100,
"pagePosition":10,
"pageCount":10,
"latitude" : 47.3520544,
"longitude" : 3.3825492,
"panelId" : 0,
"broker" : "",
"brokerPanelId" : "",
"listId" : 2,
"language" : "FRA",
"scenario" "administrator"
}
Always returns "interview".
Returns a String.
Interview.TypeOf() ' => "interview"