GroupBuilderAnswerSheetStatusVariable class
Revision as of 07:49, 2 July 2020 by Administrator (talk | contribs)
GroupBuilderAnswerSheetStatusVariable
Represents a group builder variable for answersheet status.
Parent class
Inherits from GroupBuilderVariable
Constructors
- () - Create new variable
Methods
- (From object) 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
- (From object) 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();