Difference between revisions of "GroupBuilderAnswerSheetStatusVariable class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=GroupBuilderAnswerSheetStatusVariable |Description=Represents a group builder variable for answersheet status. |Constructors= {{CGscriptConstruc...")
 
Line 13: Line 13:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
 +
<source lang="javascript">
 +
//Create a new group
 +
string groupName = "Test Group Builder: answerSheetStatusVariable ";
 +
number groupTemplateResourceId=2066;
 +
number parentResourceId = 11088827;
 +
array group = Group_new(groupName, groupTemplateResourceId, parentResourceId);
 +
Group_save(group);
 +
number groupRId = group[GROUP_RESOURCE_ID ];
 +
 +
//Create rule for the group
 +
GroupBuilderRoot root = new GroupBuilderRoot (groupRId);
 +
 +
GroupBuilderAnswerSheetStatusVariable answerSheetStatusVariable = new GroupBuilderAnswerSheetStatusVariable();
 +
answerSheetStatusVariable.Include=true;
 +
answerSheetStatusVariable.QuestionnaireResourceId=15546533;
 +
//array rpqStatus ={1,2,3,4,5};
 +
array rpqStatus ={RPQ_Status_Normal, RPQ_Status_QuotaFull, RPQ_Status_OutsideTarget, RPQ_Status_InterviewFailed,RPQ_Status_InterviewSucceeded};
 +
answerSheetStatusVariable.Status=rpqStatus;
 +
 +
GroupBuilderRule rule = new GroupBuilderRule (root);
 +
rule.Add(answerSheetStatusVariable);
 +
 +
GroupBuilderRuleCollection ruleColection = root.RootRules;
 +
ruleColection.Add(rule);
 +
 +
root.Save();
 +
</source>

Revision as of 08:45, 30 March 2017

GroupBuilderAnswerSheetStatusVariable



Represents a group builder variable for answersheet status.

Constructors

  • () - Create new variable

Methods

  • string ToString() - The string representation of the object.

Properties

  • bool Include { get; set; } - Include users that match rule, or exclude
  • string ObjectTypeName { get; } - The name of the type of object.
  • int QuestionnaireResourceId { get; set; } - Questionnaire to get users from
  • array Status { get; set; } - Set which status to look for, use RPQ_Status_* constants
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

//Create a new group
string groupName = "Test Group Builder: answerSheetStatusVariable ";
number groupTemplateResourceId=2066;
number parentResourceId = 11088827;
array group = Group_new(groupName, groupTemplateResourceId, parentResourceId);
Group_save(group);
number groupRId = group[GROUP_RESOURCE_ID ];
 
//Create rule for the group
GroupBuilderRoot root = new GroupBuilderRoot (groupRId); 

GroupBuilderAnswerSheetStatusVariable answerSheetStatusVariable = new GroupBuilderAnswerSheetStatusVariable();
answerSheetStatusVariable.Include=true;
answerSheetStatusVariable.QuestionnaireResourceId=15546533;
//array rpqStatus ={1,2,3,4,5};
array rpqStatus ={RPQ_Status_Normal, RPQ_Status_QuotaFull, RPQ_Status_OutsideTarget, RPQ_Status_InterviewFailed,RPQ_Status_InterviewSucceeded};
answerSheetStatusVariable.Status=rpqStatus;
 
GroupBuilderRule rule = new GroupBuilderRule (root);
rule.Add(answerSheetStatusVariable);
 
GroupBuilderRuleCollection ruleColection = root.RootRules;
ruleColection.Add(rule);
 
root.Save();