Difference between revisions of "Questionnaire new"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
[[Category:Questionnaire_Functions]]
+
{{HelpFiles}}  
{{HelpFiles}}
 
  
====Questionnaire_new====
+
==== Questionnaire_new ====
  
To create a new questionnaire object.
+
To create a new questionnaire object.  
  
'''Syntax'''
+
'''Syntax'''  
  
array Questionnaire_new(string questionnaireName, number questionnaireResourceTemplateResourceId, number questionnaireTemplateResourceId, number layoutResourceId, number questionnaireParentResourceId)
+
array Questionnaire_new(string questionnaireName, number questionnaireResourceTemplateResourceId, number questionnaireTemplateResourceId, number layoutResourceId, number questionnaireParentResourceId)  
  
'''Arguments'''
+
'''Arguments'''  
  
- questionnaireName : the name of new questionnaire.
+
- questionnaireName : the name of new questionnaire.  
  
- questionnaireResourceTemplateResourceId : questionnaire resource template resource id
+
- questionnaireResourceTemplateResourceId : questionnaire resource template resource id  
  
- questionanireTemplateResourceId : existing questionnaire template resource id.
+
- questionanireTemplateResourceId : existing questionnaire template resource id.  
  
- layoutResourceId : layout resource id.
+
- layoutResourceId : layout resource id.  
  
- questionnaireParentResourceId : parent resource id of questionnaire.
+
- questionnaireParentResourceId : parent resource id of questionnaire.  
  
'''Return type'''
+
'''Return type'''  
  
array.
+
array,
[QUESTIONNAIRE_OBJECT_TYPE]
+
<table width="651" cellspacing="0" cellpadding="2" border="1" style="border-collapse:collapse; border:1px solid #010101" class="tableintopic">
| style="border: 1px solid #010101" width="120" |
+
<tbody><tr valign="top" align="left">
number
+
<td width="348" bgcolor="#BFBFBF" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Index</strong></p>
| style="border: 1px solid #010101" width="183" |
+
</td>
Questionnaire object
+
<td width="120" bgcolor="#BFBFBF" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Data type</strong></p>
|- align="left" valign="top"
+
</td>
| style="border: 1px solid #010101" width="348" |
+
<td width="183" bgcolor="#BFBFBF" style="border:1px solid #010101;"><p class="bodytext"><strong class="specialbold">Value</strong></p>
[QUESTIONNAIRE_RESOURCE_ID]
+
</td>
| style="border: 1px solid #010101" width="120" |
+
</tr>
number
+
<tr valign="top" align="left">
| style="border: 1px solid #010101" width="183" |
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_OBJECT_TYPE]</p>
0
+
</td>
|- align="left" valign="top"
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
| style="border: 1px solid #010101" width="348" |
+
</td>
[QUESTIONNAIRE _NAME]
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Questionnaire object</p>
| style="border: 1px solid #010101" width="120" |
+
</td>
string
+
</tr>
| style="border: 1px solid #010101" width="183" |
+
<tr valign="top" align="left">
Entered value
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_RESOURCE_ID]</p>
|- align="left" valign="top"
+
</td>
| style="border: 1px solid #010101" width="348" |
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]
+
</td>
| style="border: 1px solid #010101" width="120" |
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">0</p>
number
+
</td>
| style="border: 1px solid #010101" width="183" |
+
</tr>
Entered value
+
<tr valign="top" align="left">
|- align="left" valign="top"
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE _NAME]</p>
| style="border: 1px solid #010101" width="348" |
+
</td>
[QUESTIONNAIRE_PARENT_RESOURCE_ID]
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">string</p>
| style="border: 1px solid #010101" width="120" |
+
</td>
number
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Entered value</p>
| style="border: 1px solid #010101" width="183" |
+
</td>
Entered value
+
</tr>
|- align="left" valign="top"
+
<tr valign="top" align="left">
| style="border: 1px solid #010101" width="348" |
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]</p>
[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]
+
</td>
| style="border: 1px solid #010101" width="120" |
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
number
+
</td>
| style="border: 1px solid #010101" width="183" |
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Entered value</p>
Entered value
+
</td>
|- align="left" valign="top"
+
</tr>
| style="border: 1px solid #010101" width="348" |
+
<tr valign="top" align="left">
[QUESTIONNAIRE_TIME_REGISTRATION]
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_PARENT_RESOURCE_ID]</p>
| style="border: 1px solid #010101" width="120" |
+
</td>
boolean
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
| style="border: 1px solid #010101" width="183" |
+
</td>
Depends on Questionnaire Resource Template settings
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Entered value</p>
|- align="left" valign="top"
+
</td>
| style="border: 1px solid #010101" width="348" |
+
</tr>
[QUESTIONNAIRE_COMPLETED]
+
<tr valign="top" align="left">
| style="border: 1px solid #010101" width="120" |
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]</p>
bool (read only)
+
</td>
| style="border: 1px solid #010101" width="183" |
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
FALSE
+
</td>
|- align="left" valign="top"
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Entered value</p>
| style="border: 1px solid #010101" width="348" |
+
</td>
[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]
+
</tr>
| style="border: 1px solid #010101" width="120" |
+
<tr valign="top" align="left">
bool
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_TIME_REGISTRATION]</p>
| style="border: 1px solid #010101" width="183" |
+
</td>
FALSE
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">boolean</p>
|- align="left" valign="top"
+
</td>
| style="border: 1px solid #010101" width="348" |
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Depends on Questionnaire Resource Template settings</p>
[QUESTIONNAIRE_USE_OLD_VIEWER]
+
</td>
| style="border: 1px solid #010101" width="120" |
+
</tr>
bool
+
<tr valign="top" align="left">
| style="border: 1px solid #010101" width="183" |
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_COMPLETED]</p>
TRUE
+
</td>
|- align="left" valign="top"
+
<td width="120" style="border:1px solid #010101;"><p class="bodytext">bool (read only)</p>
| style="border: 1px solid #010101" width="348" |
+
</td>
[QUESTIONNAIRE _ALIAS]
+
<td width="183" style="border:1px solid #010101;"><p class="bodytext">FALSE</p>
| style="border: 1px solid #010101" width="120" |
+
</td>
string
+
</tr>
| style="border: 1px solid #010101" width="183" |
+
<tr valign="top" align="left">
""
+
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">bool</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">FALSE</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_USE_OLD_VIEWER]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">bool</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">TRUE</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE _ALIAS]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">string</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">""</p>
 +
<p class="bodytext">Default:</p>
 +
<p class="bodytext">- Disabled</p>
 +
<p class="bodytext">- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_LAYOUT_RESOURCE_ID]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Entered value</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_TIME_ESTIMATE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">string</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">""</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_STATUS]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">1</p>
 +
<p class="bodytext">**Constant:</p>
 +
<p class="bodytext">1 : QUESTIONNAIRE_STATUS_CLOSED </p>
 +
<p class="bodytext">2: QUESTIONNAIRE_STATUS_PAUSED</p>
 +
<p class="bodytext">3: QUESTIONNAIRE_STATUS_ACTIVE</p>
 +
<p class="bodytext">4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST</p>
 +
<p class="bodytext">&nbsp;</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_TARGET]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">0</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_CATI_OUTCOME_SET]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">string</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">"" </p>
 +
<p class="bodytext">Only can be changed when there's no Cati contact</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">datetime array</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Mindate</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_DEVELOPMENT_START_DATE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">datetime array</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Mindate</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">datetime array </p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Maxdate</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE_DEVELOPMENT_END_DATE]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">datetime array </p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Maxdate</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE _MAN_HOURS]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">number</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">0</p>
 +
</td>
 +
</tr>
 +
<tr valign="top" align="left">
 +
<td width="348" style="border:1px solid #010101;"><p class="bodytext">[QUESTIONNAIRE _DESCRIPTION]</p>
 +
</td>
 +
<td width="120" style="border:1px solid #010101;"><p class="bodytext">string</p>
 +
</td>
 +
<td width="183" style="border:1px solid #010101;"><p class="bodytext">Default is same with questionnaire name, if description is empty</p>
 +
</td>
 +
</tr>
  
Default:
+
</tbody></table>
  
- 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
 
  
<nowiki>**Constant:</nowiki>
 
  
1 : QUESTIONNAIRE_STATUS_CLOSED
+
'''Example'''
  
2: QUESTIONNAIRE_STATUS_PAUSED
+
array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 );
  
3: QUESTIONNAIRE_STATUS_ACTIVE
+
'''Availability'''
  
4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST
+
Version 5.8 __NOTOC__ 
|- 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
+
[[Category:Questionnaire_Functions]]
|- 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
 
__NOTOC__
 
<!-- imported from file: 8015.htm-->
 

Revision as of 09:27, 15 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,

<tbody> </tbody>

Index

Data type

Value

[QUESTIONNAIRE_OBJECT_TYPE]

number

Questionnaire object

[QUESTIONNAIRE_RESOURCE_ID]

number

0

[QUESTIONNAIRE _NAME]

string

Entered value

[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_PARENT_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TIME_REGISTRATION]

boolean

Depends on Questionnaire Resource Template settings

[QUESTIONNAIRE_COMPLETED]

bool (read only)

FALSE

[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]

bool

FALSE

[QUESTIONNAIRE_USE_OLD_VIEWER]

bool

TRUE

[QUESTIONNAIRE _ALIAS]

string

""

Default:

- Disabled

- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true

[QUESTIONNAIRE_LAYOUT_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TIME_ESTIMATE]

string

""

[QUESTIONNAIRE_STATUS]

number

1

**Constant:

1 : QUESTIONNAIRE_STATUS_CLOSED

2: QUESTIONNAIRE_STATUS_PAUSED

3: QUESTIONNAIRE_STATUS_ACTIVE

4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST

 

[QUESTIONNAIRE_TARGET]

number

0

[QUESTIONNAIRE_CATI_OUTCOME_SET]

string

""

Only can be changed when there's no Cati contact

[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE]

datetime array

Mindate

[QUESTIONNAIRE_DEVELOPMENT_START_DATE]

datetime array

Mindate

[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE]

datetime array

Maxdate

[QUESTIONNAIRE_DEVELOPMENT_END_DATE]

datetime array

Maxdate

[QUESTIONNAIRE _MAN_HOURS]

number

0

[QUESTIONNAIRE _DESCRIPTION]

string

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