Difference between revisions of "QuestionGroupLeaf class"

From Catglobe Wiki
Jump to: navigation, search
Line 2: Line 2:
 
|Name=<nowiki>QuestionGroupLeaf</nowiki>
 
|Name=<nowiki>QuestionGroupLeaf</nowiki>
 
|Description=<nowiki>Question group leaf.</nowiki>
 
|Description=<nowiki>Question group leaf.</nowiki>
|Methods=
+
|InheritsFrom=QuestionGroupTree|Methods=
 
{{CGscriptMethods_Template|ReturnType=Array of QuestionGroupTree|Name=<nowiki>GetChildGroups</nowiki>|Description=<nowiki>Return all child groups, if empty then it is a leaf.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=Array of QuestionGroupTree|Name=<nowiki>GetChildGroups</nowiki>|Description=<nowiki>Return all child groups, if empty then it is a leaf.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|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|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|Description=<nowiki>Name of question 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>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=string|Name=<nowiki>SequenceType</nowiki>|HasGetter=1|Description=<nowiki>Which kind of question group is it</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>SequenceType</nowiki>|HasGetter=1|Inherited=QuestionGroupTree|Description=<nowiki>Which kind of question group is it</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|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>}}
 
}}
 
}}
 +
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
<span style="color:#DF8621"> QuestionGroupLeaf is returned when calling [[QuestionGroupRoot_class]]</span>
 
<span style="color:#DF8621"> QuestionGroupLeaf is returned when calling [[QuestionGroupRoot_class]]</span>

Revision as of 06:10, 2 July 2020

QuestionGroupLeaf


Question group leaf.

Parent class

Inherits from QuestionGroupTree

Methods

  • Array of QuestionGroupTree GetChildGroups() - Return all child groups, if empty then it is a leaf.
  • (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; } - Name of question group
  • string ObjectTypeName { get; } - The name of the type of object.
  • (From QuestionGroupTree) string SequenceType { get; } - Which kind of question group is it
  • (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