Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

GetSubQuestionText: Difference between revisions

From Catglobe Wiki
jrfconvert import
 
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
[[Category:Questionnaire_Functions]]

{{HelpFiles}}


====getSubQuestionText====
====getSubQuestionText====


Gets the text of a specific subquestion belonging to a question in user’s language or default language.
Returns a string of subquestion text in user’s language or default language. This function run in question context


'''Syntax'''
'''Syntax'''


getSubQuestionText(''question, subq_id'')
getSubQuestionText(''questionLabel, gridNumber'')
 
or
 
getSubQuestionText(''questionPath, gridNumber'')


'''Arguments'''
'''Arguments'''


''question'': Is an question object.
''questionLabel'': is a string expression. It is the label of the question.


''subq_id'': Is a numeric expression representing the subquestion.
''questionPath'': is a string expression. It is the path of the question.


''subq_id'' must not be a decimal expression.
''gridNumber'': is the index of the sub question in the sub question list.


'''Return type'''
'''Return type'''
Line 23: Line 27:


'''Example'''
'''Example'''
 
<source lang="javascript">
question MultiGrid_Question = getQuestion("MultiGrid_Question");
string text = getSubQuestionText("Q1", 0);
 
//or
string text = getSubQuestionText(MultiGrid_Question, 1);
string text = getSubQuestionText(Q1.QuestionLabel, 0);
 
//or
print(text);
string text = getSubQuestionText(Resource_getResourceName(qnaireRId) + "\\Q1", 0);
</source>


'''Availability'''
'''Availability'''


Version 4.8
Version 5.2
__NOTOC__
__NOTOC__
<!-- imported from file: 620.htm-->
<!-- imported from file: 642.htm-->

Latest revision as of 04: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