QuestionnaireTemplate class

From Catglobe Wiki
Revision as of 11:33, 25 April 2022 by Administrator (talk | contribs) (Created page with "{{CGscriptClass_Template |Name=<nowiki>QuestionnaireTemplate</nowiki> |Description=<nowiki>The questionnaire template.</nowiki> |InheritsFrom=object|Constructors= {{CGscriptCo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

QuestionnaireTemplate



The questionnaire template.

Parent class

Inherits from object

Constructors

  • (int id "Id of questionnaire template") - Fetch exists questionnaire template
  • (string qualifiedName "Qualified name of questionnaire") - Fetch exists questionnaire template by name
  • (string name "Questionnaire's name", int parentId "Resource parent's id", int resourceTemplateId "Resource tempalte's id of questionnaire template. Set it's 0 to use default resource template") - Create new questionnaire template

Methods

  • object GetProperty(PropertyType constant type "Use constant Question_Property_xxxx") - Get value of property type, return empty if not found
  • QuestionTemplate GetQuestion(string label "Question label") - Return a question by label or empty if not found
  • Empty Save(bool increaseStructureVersion "Increase structure version will force reset all QAS sequence") - Save questionnaire template
  • Empty SetProperty(PropertyType constant type "Use constant Question_Property_xxxx", object value "String or LocalizedString depend on property type. If value is empty then the property will be removed") - Set value for property type
  • (From object) string ToString() - The string representation of the object.

Properties

  • string DefaultLanguage { get; set; } - Gets and sets the default language of this questionnaire. Its value is language iso code
  • QuestionGroupRoot Groups { get; } - Information about question groups in questionnaire
  • bool HasData { get; } - check if this questionnaire temaplte contains data or not
  • int Id { get; } - Reosurce id of questionnaire template
  • array Languages { get; } - Active languages associated with this questionnaire. Its value is language iso code
  • string Name { get; set; } - Questionnaire template name
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ParentId { get; set; } - Parent resource's id
  • array Properties { get; } - Get configuration properties of this questionnaire template
  • string QualifiedName { get; } - Get qualified name of questionnaire name
  • array Questions { get; } - Get configuration questions of this questionnaire template
  • int ResourceTemplateId { get; set; } - Resource tempalte's id of questionnaire template. Set it's 0 to use default resource template
  • int StructureVersion { get; } - Structure version of the questionnaire template. It is increased when updating
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • int Version { get; } - Version of the questionnaire template. It is increased when updating

Static Methods

  • QuestionnaireTemplate QuestionnaireTemplate_current() - Get questionnaire template in current QAS or PQ context
  • Dictionary QuestionnaireTemplate_getActiveLanguages() - Return a Dictionary of all languages supported in system. The dictionary item has key is iso code and value is object {isocode: string, name: string, viewerSupported: bool}