Questionnaire class
From Catglobe Wiki
More actions
Questionnaire
The questionnaire object.
Parent class
Inherits from object
Constructors
- (int id "Id of questionnaire") - Fetch exists questionnaire by id
 - (string qualifiedName "Qualified name of questionnaire") - Fetch exists questionnaire by name
 - (string name "Questionnaire's name", int parentId "Resource parent's id", int layoutId "Questionnaire layout's id") - Create new questionnaire with new questionnaire template and use default resource template
 - (string name "Questionnaire's name", int parentId "Resource parent's id", int layoutId "Questionnaire layout's id", int templateId "Questionnaire template's id", int resourceTemplateId "Resource tempalte's id of questionnaire. Set it's 0 to use default resource template") - Create new questionnaire with exist template
 
Methods
- string GetLink() - Get the url to participate in answering the questionnaire
 - Empty RebuildSample() - Rebuild all sample rules in questionnaire
 - Empty Save() - Save questionnaire. It also save for new questionnaire template, sample rule, quota. For update, you should call save in specific object.
 - (From object) string ToString() - The string representation of the object.
 
Properties
- DateTime AutomaticCloseDate { get; set; } - Automatic close date
 - DateTime AutomaticReleaseDate { get; set; } - Automatic release date
 - string AverageInterviewSucceededTime { get;  } - Average successful interview time
 - bool Completed { get; set; } - Questionnaire status completed or not
 - int CreatedByUserId { get;  } - User created this questionnaire
 - DateTime CreatedDate { get;  } - When this questionnaire created
 - DateTime DevelopmentEndDate { get; set; } - Development end date
 - DateTime DevelopmentStartDate { get; set; } - Development start date
 - number EstimatedTotalTime { get;  } - Estimated total time to run out questionnaire
 - int Id { get;  } - Reosurce id of questionnaire
 - int ImpersonationUserId { get; set; } - Run questionnaire context with permission of specific user. Set its value is 0 to remove
 - int LayoutId { get; set; } - Questionnaire layout's id
 - int ModifiedByUserId { get;  } - User last updated this questionnaire
 - DateTime ModifiedDate { get;  } - Last time modify this questionnaire
 - string Name { get; set; } - Questionnaire name
 - int NumberOfActiveNotContacted { get;  } - Number of not started answer sheets which are related to active sample rules
 - int NumberOfActiveSample { get;  } - Number of answer sheets that are related to existing sample rules and where these sample rules are active (you can deactivate sample rules in the CATI)
 - int NumberOfAvailable { get;  } - Number of answer sheets (both created via samples, from import, as well as through recurring links) that have not yet been answered.
 - int NumberOfAvailableActive { get;  } - Number of answer sheets which are still active for answering. In other words the available answer sheets minus any sheets that have failed (user does not want to answer)
 - int NumberOfCompleted { get;  } - Number of answer sheets which were completed
 - int NumberOfCompletedToday { get;  } - Number of answer sheets which were completed on current date (server time-zone)
 - int NumberOfInterviewSucceeded { get;  } - Number of interviews carried out through CATI that were successful.
 - int NumberOfInterviewSucceededToday { get;  } - Number of interviews carried out through CATI that were successful on current date (server time-zone)
 - int NumberOfNotContacted { get;  } - Number of answer sheets which have yet not been started
 - int NumberOfPartly { get;  } - Specifies the number of sample respondents that have partly answered the questionnaire (means they have at least clicked the link to open their personal version of the questionnaire)
 - int NumberOfSample { get;  } - Total number of answer sheets related to the questionnaire
 - int NumberOfTest { get;  } - Number of test answer sheets
 - string ObjectTypeName { get;  } - The name of the type of object.
 - int ParentId { get; set; } - Parent resource's id
 - string QualifiedName { get;  } - Get qualified name of questionnaire
 - Array of  Quota Quotas { get;  } - All quotas associated with questionnaire
 - int ResourceTemplateId { get; set; } - Resource tempalte's id of questionnaire. Set it's 0 to use default resource template
 - Array of  SampleRule SampleRules { get;  } - All sample rules associated with questionnaire
 - QuestionnaireStatus constant Status { get; set; } - Questionnaire status. Use constant QUESTIONNAIRE_STATUS_xxx
 - int Target { get; set; } - Questionnaire target number
 - int TemplateId { get;  } - Questionnaire template's id
 - int TimeEstimateId { get; set; } - Questionnaire time estimate's id. Set its value is 0 to remove
 - string TimeEstimateName { get; set; } - Questionnaire time estimate's name. Set its value is empty to remove
 - (From object) TypeInformation TypeInformation { get;  } - Get information about this class.
 
Static Methods
- Questionnaire Questionnaire_current() - Get questionnaire in current QAS or PQ context
 
Examples
//create new qnaire and also new qnaireTemplate under
string qnaireName = "test";
number parentId = 17148135;
number layoutId = 15735155;
Questionnaire qnaire = new Questionnaire (qnaireName, parentId, layoutId);
qnaire.ResourceTemplateId = 11088801;
qnaire.Save();
//create new qnaire using existing qnaireTemplate
string qnaireName = "test";
number parentId = 17148135;
number layoutId = 15735155;
number qnaireTemplateId = 17148298;
number resourceTemplateId = 11088801;// set 0 to use the default
Questionnaire qnaire = new Questionnaire (qnaireName, parentId, layoutId, qnaireTemplateId, resourceTemplateId);
qnaire.Save();