Difference between revisions of "GetSubQuestionText"

From Catglobe Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Questionnaire_Functions]]
 
[[Category:Questionnaire_Functions]]

+
{{HelpFiles}}
  
 
====getSubQuestionText====
 
====getSubQuestionText====
  
Returns the text of the Subquestion with index in the question named label in the current questionnaire
+
Returns a string of subquestion text in user’s language or default language. This function run in question context
  
 
'''Syntax'''
 
'''Syntax'''
  
 
getSubQuestionText(''questionLabel, gridNumber'')
 
getSubQuestionText(''questionLabel, gridNumber'')
 +
 +
or
 +
 +
getSubQuestionText(''questionPath, gridNumber'')
  
 
'''Arguments'''
 
'''Arguments'''
  
 
''questionLabel'': is a string expression. It is the label of the question.
 
''questionLabel'': is a string expression. It is the label of the question.
 +
 +
''questionPath'': is a string expression. It is the path of the question.
  
 
''gridNumber'': is the index of the sub question in the sub question list.
 
''gridNumber'': is the index of the sub question in the sub question list.
Line 21: Line 27:
  
 
'''Example'''
 
'''Example'''
 
+
<source lang="javascript">
string text = getSubQuestionText("MultiGrid_Question", 2);
+
string text = getSubQuestionText("Q1", 0);
 
+
//or
print(text);
+
string text = getSubQuestionText(Q1.QuestionLabel, 0);
 +
//or
 +
string text = getSubQuestionText(Resource_getResourceName(qnaireRId) + "\\Q1", 0);
 +
</source>
  
 
'''Availability'''
 
'''Availability'''

Latest revision as of 05:30, 23 August 2019



getSubQuestionText

Returns a string of subquestion text in user’s language or default language. This function run in question context

Syntax

getSubQuestionText(questionLabel, gridNumber)

or

getSubQuestionText(questionPath, gridNumber)

Arguments

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

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

gridNumber: is the index of the sub question in the sub question list.

Return type

string

Example

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

Availability

Version 5.2