GetQuestion

GetQuestion returns a question of the script by name.

Syntax

varPage.GetQuestion(name)

where varPage is the Page object.

Argument Description

name

The name of a SmartScript question as a string

Returns

A question of the script as a SmartScriptQuestion.

Usage

Specify the name of the question as a parameter to the GetQuestion method to retrieve the question as a SmartScriptQuestion. The name you specify is the nontranslated name set during authoring, not the question text displayed for a particular language. GetQuestion is declared as a SmartScriptQuestion.

You must also specify the page where the question appears. If the question appears on the current page, you do this as follows:

var Question = Page().GetQuestion ("Name of question");

If the question appears on another page, you must retrieve this page as in the following example:

var p=Script().GetPage("Other page name");
var Question = p.GetQuestion ("Name of question");
Dim ContactQuestion as SmartScriptQuestion
	Set ContactQuestion = myPage.GetQuestion("First Name")

See Also

GetQuestionEnable.