In AskiaScript, the survey object contains all the available information about the survey itself. It is in the global scope, so is accessible everywhere within AskiaScript.
In this topic:
Return the list of questions at the level 0 in the treeview
Returns a collection of Questions.
Survey.ChildQuestions
Returns the median of the duration of interviews in seconds
Returns a Number.
Survey.DurationMedian ' => 25
Returns the file name of the survey.
Returns a String.
Survey.FileName ' => "N345_Coca.qex"
Returns the identifier of the survey (as registered in the CCA), or 0 when not yet registered.
Returns a Number.
Survey.Id ' => 13
Returns the list of survey languages.
Return an Array of Language.
Survey.Languages.Count ' => 3
Survey.Languages[1].Abbr ' => "ENG"
Survey.Languages[2].Name ' => "French (France)"
Returns the name of the survey (as it register in the CCA) or the filename of the survey when not yet registered.
Returns a String.
' Name of the survey in the CCA Survey.Name ' => "N345 - Coca Cola"
' When not yet registered Survey.Name ' => "N345_Coca.qex"
Return the list of questions of the survey
Returns a collection of Questions.
Survey.Questions
Returns the physical path of the Resources path folder (same as ??PhysicalResPath??)
Return a String
Survey.ResourcePath ' => c:mydirectoryResources
Returns the url of the Resources path folder (same as ??ResPath??)
Return a String
Survey.ResourceURL ' => ../Resources/
Returns the revision number of the survey file
Return a Number
Survey.Revision ' => 13
Returns the list of survey resources
Return an Array of Resource
Survey.Resources.Count ' => 2
Survey.Resources[1].Name ' => "Logo"
Returns the list of survey scenarios.
Return an Array of String
Survey.Scenarios.Count ' => 2
Survey.Scenarios[1] ' => "Woman Version"
Returns the settings value selected for the detection of the speeder
Returns a Number.
0 - disabled
1 - manual detection
2 - automatic detection
Survey.Speeder ' => 2
Returns the median of the speed of interviews. The speed is (the number of clicks + the number ok keystrokes / 3) / Duration
Returns a Number.
Survey.SpeedMedian ' => .2
Returns the settings value selected for the detection of the straightliner
Returns a Number.
0 - disabled
1 - manual detection
2 - automatic detection
Survey.Straightliner ' => 2
Returns an Array of String.
Survey.Tags ' => {"tag1";"tag2"}
Survey.Tags.Count ' => "2"
Survey.Tags[2] ' => "tag2"
Return a string representation of the survey (express in json format)
Return a String
' Output in a single line (it's break here for the readability)
Survey.ToString()
' => {
"id":1,
"name":"ExampleSurvey",
"fileName":"EX.qex",
"revision":12,
...
}
Always return "survey"
Return a String
Survey.TypeOf() ' => "survey"