Difference between revisions of "GetQuestionText"

From Catglobe Wiki
Jump to: navigation, search
(jrfconvert import)
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
+
[[Category:Questionnaire_Functions]]

+
{{HelpFiles}}
  
 
====getQuestionText====
 
====getQuestionText====
  
Gets the text of the specified question in user’s language or default language.
+
Gets the text of the specified question in user’s language or default language. This function run in question context
  
 
'''Syntax'''
 
'''Syntax'''
  
getQuestionText(''question'')
+
getQuestionText(''questionLabel'')
 +
 
 +
or
 +
 
 +
getQuestionText(''questionPath'')
  
 
'''Arguments'''
 
'''Arguments'''
  
''question'': Is a question object.
+
''questionLabel'': a string expression. It is the label of a question  
 +
 
 +
''questionPath'': a string expression. It is the path of a question  
  
 
'''Return type'''
 
'''Return type'''
Line 19: Line 25:
  
 
'''Examples'''
 
'''Examples'''
 
+
<source lang="javascript">
string s = getQuestionText(DomesticAnimal);
+
string text = getQuestionText("Q1");
 
+
//or
print(s);
+
string text = getQuestionText(Q1.QuestionLabel);
 
+
//or
 +
string text = getQuestionText(Resource_getResourceName(qnaireRId) + "\\Q1");
 +
</source>
 
'''Availability'''
 
'''Availability'''
  

Latest revision as of 06:34, 23 August 2019



getQuestionText

Gets the text of the specified question in user’s language or default language. This function run in question context

Syntax

getQuestionText(questionLabel)

or

getQuestionText(questionPath)

Arguments

questionLabel: a string expression. It is the label of a question

questionPath: a string expression. It is the path of a question

Return type

string

Examples

string text = getQuestionText("Q1");
//or
string text = getQuestionText(Q1.QuestionLabel);
//or
string text = getQuestionText(Resource_getResourceName(qnaireRId) + "\\Q1");

Availability

Version 4.8