Survey object

Available from version 5.5.2.0

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:

Properties

ChildQuestions

Available from version 5.5.2.0

Return the list of questions at the level 0 in the treeview

Returns a collection of Questions.

Examples
 Survey.ChildQuestions

↑ Top of page ↑

DurationMedian

Available from version 5.6.0.0

Returns the median of the duration of interviews in seconds

Returns a Number.

Examples
 Survey.DurationMedian ' => 25

↑ Top of page ↑

FileName

Available from version 5.5.2.0

Returns the file name of the survey.

Returns a String.

Survey.FileName ' => "N345_Coca.qex"

↑ Top of page ↑

Id

Available from version 5.5.2.0

Returns the identifier of the survey (as registered in the CCA), or 0 when not yet registered.

Returns a Number.

Survey.Id ' => 13

↑ Top of page ↑

Languages

Avaialable from version 5.5.2.0

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)"

↑ Top of page ↑

Name

Available from version 5.5.2.0

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"

↑ Top of page ↑

Questions

Available from version 5.5.2.0

Return the list of questions of the survey

Returns a collection of Questions.

Examples
 Survey.Questions

↑ Top of page ↑

ResourcePath

Available from version 5.5.2

Returns the physical path of the Resources path folder (same as ??PhysicalResPath??)

Return a String

Survey.ResourcePath ' => c:mydirectoryResources

↑ Top of page ↑

ResourceURL

Available from version 5.5.2

Returns the url of the Resources path folder (same as ??ResPath??)

Return a String

Survey.ResourceURL ' => ../Resources/

↑ Top of page ↑

Revision

Available from version 5.5.2.0

Returns the revision number of the survey file

Return a Number

Survey.Revision ' => 13

↑ Top of page ↑

Resources

Proposed for version 6.0.

Returns the list of survey resources

Return an Array of Resource

Survey.Resources.Count ' => 2
Survey.Resources[1].Name ' => "Logo"

↑ Top of page ↑

Scenarios

Available from version 5.5.2.0

Returns the list of survey scenarios.

Return an Array of String

Survey.Scenarios.Count ' => 2
Survey.Scenarios[1] ' => "Woman Version"

↑ Top of page ↑

Speeder

Available from version 5.6.1.0

Returns the settings value selected for the detection of the speeder

Returns a Number.


0 - disabled
1 - manual detection
2 - automatic detection

Examples
 Survey.Speeder ' => 2

↑ Top of page ↑

SpeedMedian

Available from version 5.6.0.0

Returns the median of the speed of interviews. The speed is (the number of clicks + the number ok keystrokes / 3) / Duration

Returns a Number.

Examples
 Survey.SpeedMedian ' => .2

↑ Top of page ↑

Straightliner

Available from version 5.6.1.0

Returns the settings value selected for the detection of the straightliner

Returns a Number.


0 - disabled
1 - manual detection
2 - automatic detection

Examples
 Survey.Straightliner ' => 2

↑ Top of page ↑

Tags

Available from version 5.5.2.0

Returns an Array of String.

Examples
 Survey.Tags ' => {"tag1";"tag2"}
 Survey.Tags.Count  ' => "2"
 Survey.Tags[2] ' => "tag2"

↑ Top of page ↑

Methods

ToString()

Available from version 5.5.2.0

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,
...
}

↑ Top of page ↑

TypeOf()

Available from version 5.5.2.0

Always return "survey"

Return a String

Survey.TypeOf() ' => "survey"

↑ Top of page ↑

Create your own Knowledge Base