Difference between revisions of "Quota new"
Line 22: | Line 22: | ||
array | array | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | {| width="651" class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse;" border="1" cellspacing="0" cellpadding="2" | |
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | ||
+ | '''Index''' | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | ||
+ | '''Data type''' | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | ||
+ | '''Initial value''' | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [OBJECT_TYPE] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | Quota object | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_ID] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | 0 | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_NAME] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | string | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | Entered value | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_TARGET] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | Entered value | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_EXPRESSION] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | string | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | Entered value | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_QUESTIONNAIRE_RESOURCE_ID] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | Entered value ( current PQ resource id if no entered value) | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_DESCRIPTION] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | string | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | empty string | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_PRESTRATIFICATION] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | bool | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | FALSE | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_DISABLED] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | bool | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | FALSE | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_CURRENT] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number (read only) | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | 0 | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | width="318" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | [QUOTA_ONGOING] | ||
+ | |||
+ | | width="116" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | number (read only) | ||
+ | |||
+ | | width="217" style="border: 1px solid rgb(1, 1, 1);" | | ||
+ | 0 | ||
+ | |||
+ | |} | ||
'''Example''' | '''Example''' |
Revision as of 09:20, 15 December 2011
Quota_new
To create a new quota object.
Syntax
array Quota_new(string quotaName, number quotaTarget, string quotaExpression[, number PQResourceId])
Arguments
- quotaName : the name of new quota.
- quotaTarget : the target of quota.
- quotaExpression : the expression of quota.
- PQResourceId : Id of questionnaire to which quota belongs
Return type
array
Index |
Data type |
Initial value |
[OBJECT_TYPE] |
number |
Quota object |
[QUOTA_ID] |
number |
0 |
[QUOTA_NAME] |
string |
Entered value |
[QUOTA_TARGET] |
number |
Entered value |
[QUOTA_EXPRESSION] |
string |
Entered value |
[QUOTA_QUESTIONNAIRE_RESOURCE_ID] |
number |
Entered value ( current PQ resource id if no entered value) |
[QUOTA_DESCRIPTION] |
string |
empty string |
[QUOTA_PRESTRATIFICATION] |
bool |
FALSE |
[QUOTA_DISABLED] |
bool |
FALSE |
[QUOTA_CURRENT] |
number (read only) |
0 |
[QUOTA_ONGOING] |
number (read only) |
0 |
Example
array a = Quota_new("male",5,"Qsingle == 1");
OR
array a = Quota_new("male",5,"Qsingle == 1",34806989);
Availability
Version 5.8