Difference between revisions of "Questionnaire new"
Line 1: | Line 1: | ||
[[Category:Questionnaire_Functions]] | [[Category:Questionnaire_Functions]] | ||
− | + | {{HelpFiles}} | |
====Questionnaire_new==== | ====Questionnaire_new==== |
Revision as of 07:43, 13 December 2011
Questionnaire_new
To create a new questionnaire object.
Syntax
array Questionnaire_new(string questionnaireName, number questionnaireResourceTemplateResourceId, number questionnaireTemplateResourceId, number layoutResourceId, number questionnaireParentResourceId)
Arguments
- questionnaireName : the name of new questionnaire.
- questionnaireResourceTemplateResourceId : questionnaire resource template resource id
- questionanireTemplateResourceId : existing questionnaire template resource id.
- layoutResourceId : layout resource id.
- questionnaireParentResourceId : parent resource id of questionnaire.
Return type
array. [QUESTIONNAIRE_OBJECT_TYPE] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | Questionnaire object |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_RESOURCE_ID] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | 0 |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE _NAME] | style="border: 1px solid #010101" width="120" | string | style="border: 1px solid #010101" width="183" | Entered value |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | Entered value |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_PARENT_RESOURCE_ID] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | Entered value |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_TEMPLATE_RESOURCE_ID] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | Entered value |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_TIME_REGISTRATION] | style="border: 1px solid #010101" width="120" | boolean | style="border: 1px solid #010101" width="183" | Depends on Questionnaire Resource Template settings |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_COMPLETED] | style="border: 1px solid #010101" width="120" | bool (read only) | style="border: 1px solid #010101" width="183" | FALSE |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE] | style="border: 1px solid #010101" width="120" | bool | style="border: 1px solid #010101" width="183" | FALSE |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_USE_OLD_VIEWER] | style="border: 1px solid #010101" width="120" | bool | style="border: 1px solid #010101" width="183" | TRUE |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE _ALIAS] | style="border: 1px solid #010101" width="120" | string | style="border: 1px solid #010101" width="183" | ""
Default:
- Disabled
- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_LAYOUT_RESOURCE_ID] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | Entered value |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_TIME_ESTIMATE] | style="border: 1px solid #010101" width="120" | string | style="border: 1px solid #010101" width="183" | "" |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_STATUS] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | 1
**Constant:
1 : QUESTIONNAIRE_STATUS_CLOSED
2: QUESTIONNAIRE_STATUS_PAUSED
3: QUESTIONNAIRE_STATUS_ACTIVE
4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_TARGET] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | 0 |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_CATI_OUTCOME_SET] | style="border: 1px solid #010101" width="120" | string | style="border: 1px solid #010101" width="183" | ""
Only can be changed when there's no Cati contact |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE] | style="border: 1px solid #010101" width="120" | datetime array | style="border: 1px solid #010101" width="183" | Mindate |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_DEVELOPMENT_START_DATE] | style="border: 1px solid #010101" width="120" | datetime array | style="border: 1px solid #010101" width="183" | Mindate |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE] | style="border: 1px solid #010101" width="120" | datetime array | style="border: 1px solid #010101" width="183" | Maxdate |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE_DEVELOPMENT_END_DATE] | style="border: 1px solid #010101" width="120" | datetime array | style="border: 1px solid #010101" width="183" | Maxdate |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE _MAN_HOURS] | style="border: 1px solid #010101" width="120" | number | style="border: 1px solid #010101" width="183" | 0 |- align="left" valign="top" | style="border: 1px solid #010101" width="348" | [QUESTIONNAIRE _DESCRIPTION] | style="border: 1px solid #010101" width="120" | string | style="border: 1px solid #010101" width="183" | Default is same with questionnaire name, if description is empty
Example
array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 );
Availability
Version 5.8