ExportSettingsNipoFile class

From Catglobe Wiki
Revision as of 08:56, 24 April 2017 by Nguyenduyan (talk | contribs)
Jump to: navigation, search

ExportSettingsNipoFile



Export settings for the 3 Nipo File formats.


Methods

  • Empty AddAllQuestions(int questionnaireResourceId "The questionnaire the question is located in", bool exportToOFile "Export to the given format", bool exportToUFile "Export to the given format", bool exportToQFile "Export to the given format") - Add all questions to the export
  • Empty AddQuestion(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question", int length "Length of export field, if set to 0 autodetect", bool exportToOFile "Export to the given format", bool exportToUFile "Export to the given format", bool exportToQFile "Export to the given format") - Add question to the export
  • Empty Clear() - Remove format from output
  • int GridIndex(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return GridIndex of question in export
  • bool IsQuestionExported(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return true if question is exported
  • int Length(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return Length of question in export
  • int Position(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return Position of question in export
  • string ToString() - The string representation of the object.

Properties

  • bool IsNipoOFileExport { get; } - Get if exporting to specific format
  • bool IsNipoQFileExport { get; } - Get if exporting to specific format
  • bool IsNipoUFileExport { get; } - Get if exporting to specific format
  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.

Examples

string ResourceName="test ExportManager type OFile, UFile, QFile";
number parentResourceId = 11088827;
ExportManager EM = new ExportManager (ResourceName, parentResourceId ); 
number questionnaireResourceId  = 15546533;
EM.AddQuestionnaire(questionnaireResourceId); 
ExportSettingsNipoFile exportSetting = EM.ExportSettingsNipoFile;
bool exportToOFile = true;
bool exportToUFile = true;
bool exportToQFile = true;
exportSetting.AddAllQuestions(questionnaireResourceId, exportToOFile, exportToUFile, exportToQFile);
EM.Language ="en-GB"; 
DateTime startTime = new DateTime ("2016-4-18");
DateTime endTime = new DateTime ("2017-4-19");
EM.SelectTimeFrame =true;
EM.CGStartTimeFrameUTC = startTime;
EM.CGEndTimeFrameUTC = endTime; 
EM.QasNotStarted = false;
EM.QasPartly = false;
EM.QasCompleted = true; 
EM.QasNormal = true;
EM.QasQuotaFull = false;
EM.QasOutsideTarget = false;
EM.QasInterviewFailed = false;
EM.QasInterviewSucceded = true; 
EM.IncludedTestData= false;
EM.IncludedDeletedUsers = false;
EM.IncludedDisabledUsers = false;
EM.Save();
EM.Export();