Resource type variable

Proposal for version 6.0

Variable which contains all the available information about a resource.

To create a language type variable, add a resource to the survey.

This object is accessible through the Survey.Resources collection

In this topic:

Properties

Id

Proposal for version 6.0

Id of the resource.

Returns a Number.

Examples
Survey.Resources[1].Id ' => 3
Survey.Resources[2].Id ' => 7

↑ Top of page ↑

Name

Proposal for version 6.0

Returns the name of the resource.

Returns a String.

Examples
Survey.Resources[1].Name ' => "asahi"
Survey.Resources[2].Name ' => "corona"

↑ Top of page ↑

StoredExternally

Proposal for version 6.0

Returns true if the path of the resource is stored externally.

Returns a Boolean.

Examples
Survey.Resources[1].StoredExternally ' => true
Survey.Resources[2].StoredExternally ' => false

↑ Top of page ↑

ResourceURL

Proposal for version 6.0

Returns the URL of the resource.

Returns a String.

Example
Survey.Ressources[1].ResourceURL  ' => "/asahi.png"

↑ Top of page ↑

ResourceID

Proposal for version 6.0

ResourceID of the resource.

Returns a Number.

Examples
Survey.Resources[1].ResourceID ' => 0
Survey.Resources[2].ResourceID ' => 2

↑ Top of page ↑

Language

Proposal for version 6.0

Language of the resource.

Returns a Language.

Examples
Survey.Resources[1].Language.Id ' => 2057 (for English)
Survey.Resources[1].Language.Name ' => "English (United Kingdom)"

↑ Top of page ↑

Scenarios

Proposal for version 6.0

Returns the list of resource scenarios.

Return an Array of String

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

↑ Top of page ↑

 

Methods

 

ToString()

Proposal for version 6.0

Returns a string which represents the resource (express in JSON format).

Returns a String.

Example
' Output in a single line (it's break here for the readability)
Survey.Resources[1].ToString() 
' => {
"id" : 3,
"name" : "asahi",
"storedexternally" : false,
"resourceurl" : "asahi",
"resourceid" : 0,
...
}

↑ Top of page ↑

TypeOf()

Proposal for version 6.0

Always returns "resource".

Returns a String.

Example
Survey.Resources[1].TypeOf() ' => "resource" 

↑ Top of page ↑

 

 

Create your own Knowledge Base