Difference between revisions of "ExportSettingsNipoFile class"
Nguyenduyan (talk | contribs) |
|||
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
− | |Name=ExportSettingsNipoFile | + | |Name=<nowiki>ExportSettingsNipoFile</nowiki> |
− | |Description=Export settings for the 3 Nipo File formats. | + | |Description=<nowiki>Export settings for the 3 Nipo File formats.</nowiki> |
|Methods= | |Methods= | ||
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=AddAllQuestions|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddAllQuestions</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToOFile|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToUFile|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToQFile|Description=Export to the given format}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToOFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToUFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToQFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>}} |
− | |Description=Add all questions to the export}} | + | |Description=<nowiki>Add all questions to the export. Default ignore GDPR classified questions.</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=AddQuestion|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddAllQuestions</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=length|Description=Length of export field, if set to 0 autodetect|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToOFile|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToUFile|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToQFile|Description=Export to the given format}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToOFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToUFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToQFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>includeQuestionWithGDPRDate</nowiki>|Description=<nowiki>Include questions marked as containing GDPR classified data</nowiki>}} |
− | |Description=Add question to the export}} | + | |Description=<nowiki>Add all questions to the export. Default ignore GDPR classified questions.</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=Clear|Description=Remove format from output}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddQuestion</nowiki>|Parameters= |
− | {{CGscriptMethods_Template|ReturnType=int|Name=GridIndex|Parameters= | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>length</nowiki>|Description=<nowiki>Length of export field, if set to 0 autodetect</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToOFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToUFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToQFile</nowiki>|Description=<nowiki>Export to the given format</nowiki>}} |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}} | + | |Description=<nowiki>Add question to the export</nowiki>}} |
− | |Description=Return GridIndex of question in export}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove format from output</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=bool|Name=IsQuestionExported|Parameters= | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GridIndex</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}} |
− | |Description=Return true if question is exported}} | + | |Description=<nowiki>Return GridIndex of question in export</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=int|Name=Length|Parameters= | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsQuestionExported</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}} |
− | |Description=Return Length of question in export}} | + | |Description=<nowiki>Return true if question is exported</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=int|Name=Position|Parameters= | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Length</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}} |
− | |Description=Return Position of question in export}} | + | |Description=<nowiki>Return Length of question in export</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Position</nowiki>|Parameters= |
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}} | ||
+ | |Description=<nowiki>Return Position of question in export</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | ||
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType=bool|Name=IsNipoOFileExport|HasGetter=1|Description=Get if exporting to specific format}} | + | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsNipoOFileExport</nowiki>|HasGetter=1|Description=<nowiki>Get if exporting to specific format</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=bool|Name=IsNipoQFileExport|HasGetter=1|Description=Get if exporting to specific format}} | + | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsNipoQFileExport</nowiki>|HasGetter=1|Description=<nowiki>Get if exporting to specific format</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=bool|Name=IsNipoUFileExport|HasGetter=1|Description=Get if exporting to specific format}} | + | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsNipoUFileExport</nowiki>|HasGetter=1|Description=<nowiki>Get if exporting to specific format</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} | ||
+ | |||
=== <span style="color:#DF8621">'''Examples'''</span> === | === <span style="color:#DF8621">'''Examples'''</span> === | ||
<source lang="javascript"> | <source lang="javascript"> |
Revision as of 11:31, 4 February 2020
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. Default ignore GDPR classified questions.
- 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", bool includeQuestionWithGDPRDate "Include questions marked as containing GDPR classified data") - Add all questions to the export. Default ignore GDPR classified questions.
- 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();