Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

QuestionProperty class

From Catglobe Wiki

QuestionProperty



The question property.

Parent class

Inherits from object

Methods

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

Properties

  • int GridNumber { get; } - Get GridNumber of the question property
  • bool HasText { get; } - Get HasText of the question property
  • int Id { get; } - Get id of the question property
  • bool IsSpecialText { get; } - Get IsSpecialText of the question property
  • string Name { get; } - Get Name of the question property
  • string ObjectTypeName { get; } - The name of the type of object.
  • int QuestionID { get; } - Get QuestionID of the question property
  • Dictionary QuestionPropertyLanguages { get; } - Get QuestionPropertyLanguages of the question property. Only valid when HasText is true
  • LocalizedString QuestionPropertyLanguagesLocalized { get; } - Same as QuestionPropertyLanguages, just different container
  • int QuestionPropertyType { get; } - Get QuestionPropertyType of the question property
  • string QuestionPropertyTypeAsString { get; } - Get QuestionPropertyType as string of the question property
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • string TypeValue { get; } - Get TypeValue of the question property
  • string Value { get; } - Get Value of the question property. Only valid when HasText is false


Examples

// Example to get Export/Report label on "Q7"

string questionName = "Q7";
number qnaireRId = 15644863;
array questionProperty = getQuestionProperties(questionName, qnaireRId);
for(number i = 0; i < questionProperty.Count; i++) 
{
	QuestionProperty qp = questionProperty[i];
	print(qp.QuestionPropertyType);//97
	print(qp.QuestionPropertyLanguages);//{"da-DK": Export Report label in DK, "en-GB": Export Report label in UK}
	print(qp.QuestionPropertyLanguagesLocalized.GetTranslationForLoggedInUser());//Export Report label in UK
	print(qp.QuestionPropertyLanguagesLocalized.GetSpecificTranslation("da-DK"));//Export Report label in DK
}