Difference between revisions of "QuestionGroupLeaf class"
Line 2: | Line 2: | ||
|Name=<nowiki>QuestionGroupLeaf</nowiki> | |Name=<nowiki>QuestionGroupLeaf</nowiki> | ||
|Description=<nowiki>Question group leaf.</nowiki> | |Description=<nowiki>Question group leaf.</nowiki> | ||
− | |InheritsFrom=QuestionGroupTree|Methods= | + | |InheritsFrom=QuestionGroupTree|Constructors= |
− | {{CGscriptMethods_Template|ReturnType=Array of | + | {{CGscriptConstructors_Template|Parameters= |
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Group name</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=QuestionnaireTemplate|Name=<nowiki>qt</nowiki>|Description=<nowiki>Questionnaire template</nowiki>}} | ||
+ | |Description=<nowiki>Create s leaf group</nowiki>}} | ||
+ | |Methods= | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of String|Name=<nowiki>GetQuestions</nowiki>|Description=<nowiki>Return label of questions in group</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetQuestions</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of String|Name=<nowiki>labels</nowiki>|Description=<nowiki>Question labels</nowiki>}} | ||
+ | |Description=<nowiki>Set questions in group by their label</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} | ||
|Properties= | |Properties= | ||
{{CGscriptProperties_Template|ReturnType=Array of strings|Name=<nowiki>AllQuestions</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Labels of all questions in this group</nowiki>}} | {{CGscriptProperties_Template|ReturnType=Array of strings|Name=<nowiki>AllQuestions</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Labels of all questions in this group</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Count</nowiki>|HasGetter=1|Description=<nowiki>How many children in this group</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Count</nowiki>|HasGetter=1|Description=<nowiki>How many children in this group</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>GroupName</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Name of question group</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>GroupName</nowiki>|HasGetter=1|HasSetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Name of question group</nowiki>}} |
+ | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsLeaf</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Check if it is leaf group or not</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType= | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>SelectCount</nowiki>|HasGetter=1|HasSetter=1|Inherited=QuestionGroupTree|Description=<nowiki>How many child items will be used for Sequence_Command_RandomizedSelect or Sequence_Command_RotateSelect</nowiki>}} |
+ | {{CGscriptProperties_Template|ReturnType=SequenceCommand constant|Name=<nowiki>SequenceCommand</nowiki>|HasGetter=1|HasSetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Which kind of this group is it, use constant Sequence_Command_xxx</nowiki>}} | ||
+ | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>SequenceType</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Respent SequenceCommand as string</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} | ||
}} | }} |
Revision as of 10:48, 25 April 2022
QuestionGroupLeaf
Question group leaf.
Parent class
Inherits from QuestionGroupTree
Constructors
- (string name "Group name", QuestionnaireTemplate qt "Questionnaire template") - Create s leaf group
Methods
- Array of String GetQuestions() - Return label of questions in group
- Empty SetQuestions(Array of String labels "Question labels") - Set questions in group by their label
- (From object) string ToString() - The string representation of the object.
Properties
- (From QuestionGroupTree) Array of string AllQuestions { get; } - Labels of all questions in this group
- int Count { get; } - How many children in this group
- (From QuestionGroupTree) string GroupName { get; set; } - Name of question group
- (From QuestionGroupTree) bool IsLeaf { get; } - Check if it is leaf group or not
- string ObjectTypeName { get; } - The name of the type of object.
- (From QuestionGroupTree) number SelectCount { get; set; } - How many child items will be used for Sequence_Command_RandomizedSelect or Sequence_Command_RotateSelect
- (From QuestionGroupTree) SequenceCommand constant SequenceCommand { get; set; } - Which kind of this group is it, use constant Sequence_Command_xxx
- (From QuestionGroupTree) string SequenceType { get; } - Respent SequenceCommand as string
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
QuestionGroupLeaf is returned when calling QuestionGroupRoot_class
number qnaireRId = 15644704;
QuestionGroupRoot root = Questionnaire_getQuestionGroups(qnaireRId);
QuestionGroupLeaf leaf = root.FindByQuestion("Q1");
print(leaf.GroupName);//G2