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

GetAnswerOptionText: Difference between revisions

From Catglobe Wiki
jrfconvert import
ย 
No edit summary
ย 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
[[Category:Questionnaire_Functions]]
๏ปฟ
{{HelpFiles}}


====getAnswerOptionText====
====getAnswerOptionText====


Returns the text of an answer option with value in the question named label in the current questionnaire
Returns string of answer option text in userโ€™s language or default language. This function run in question context


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


getAnswerOptionText(questionLabel, answerOptionValue)
getAnswerOptionText(questionLabel, answerOptionValue)
or:
getAnswerOptionText(questionPath, answerOptionValue)


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


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


''answerOptionValue'': a numeric expression. It is the value of the answer option
''answerOptionValue'': a numeric expression. It is the value of the answer option
Line 21: Line 27:


'''Example'''
'''Example'''
<source lang="javascript">


string text = getAnswerOptionText("Q1", 1);
string text = getAnswerOptionText("Q1", 1);
ย 
//or
print(text);
string text = getAnswerOptionText(Q1.QuestionLabel, 1);
//or
string text = getAnswerOptionText(Resource_getResourceName(qnaireRId) + "\\Q1", 1);
</source>


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

Latest revision as of 04:29, 23 August 2019


getAnswerOptionText

Returns string of answer option text in userโ€™s language or default language. This function run in question context

Syntax

getAnswerOptionText(questionLabel, answerOptionValue)

or:

getAnswerOptionText(questionPath, answerOptionValue)

Arguments

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

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

answerOptionValue: a numeric expression. It is the value of the answer option

Return type

string

Example

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

Availability

Version 5.2