Difference between revisions of "Quota new"

From Catglobe Wiki
Jump to: navigation, search
(jrfconvert import)
 
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
+
{{HelpFiles}}

 
  
====Quota_new====
+
==== Quota_new ====
  
To create a new quota object.
+
To create a new quota object.  
  
'''Syntax'''
+
'''Syntax'''  
  
array Quota_new(string quotaName, number quotaTarget, string quotaExpression[, number PQResourceId])
+
array Quota_new(string quotaName, number quotaTarget, string quotaExpression[, number PQResourceId])  
  
'''Arguments'''
+
'''Arguments'''  
  
- quotaName : the name of new quota.
+
- quotaName : the name of new quota.  
  
- quotaTarget : the target of quota.
+
- quotaTarget : the target of quota.  
  
- quotaExpression : the expression of quota.
+
- quotaExpression : the expression of quota.  
  
- PQResourceId : Id of questionnaire to which quota belongs
+
- PQResourceId : Resource Id of questionnaire to which quota belongs. If it's empty, the project questionnaire context is needed
  
'''Return type'''
+
'''Return type'''  
  
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]
 
[OBJECT_TYPE]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number
 
number
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
Quota object
 
Quota object
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_ID]
 
[QUOTA_ID]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number
 
number
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
0
 
0
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_NAME]
 
[QUOTA_NAME]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
string
 
string
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
Entered value
 
Entered value
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_TARGET]
 
[QUOTA_TARGET]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number
 
number
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
Entered value
 
Entered value
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_EXPRESSION]
 
[QUOTA_EXPRESSION]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
string
 
string
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
Entered value
 
Entered value
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_QUESTIONNAIRE_RESOURCE_ID]
 
[QUOTA_QUESTIONNAIRE_RESOURCE_ID]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number
 
number
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
Entered value ( current PQ resource id if no entered value)
 
Entered value ( current PQ resource id if no entered value)
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_DESCRIPTION]
 
[QUOTA_DESCRIPTION]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
string
 
string
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
empty string
 
empty string
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_PRESTRATIFICATION]
 
[QUOTA_PRESTRATIFICATION]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
bool
 
bool
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
FALSE
 
FALSE
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_DISABLED]
 
[QUOTA_DISABLED]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
bool
 
bool
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
FALSE
 
FALSE
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_CURRENT]
 
[QUOTA_CURRENT]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number (read only)
 
number (read only)
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
0
 
0
 +
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| style="border: 1px solid #010101" width="318" |
+
| width="318" style="border: 1px solid rgb(1, 1, 1);" |  
 
[QUOTA_ONGOING]
 
[QUOTA_ONGOING]
| style="border: 1px solid #010101" width="116" |
+
 
 +
| width="116" style="border: 1px solid rgb(1, 1, 1);" |  
 
number (read only)
 
number (read only)
| style="border: 1px solid #010101" width="217" |
+
 
 +
| width="217" style="border: 1px solid rgb(1, 1, 1);" |  
 
0
 
0
  
'''Example'''
+
|}
 +
 
 +
'''Example'''  
 +
 
 +
array a = Quota_new("Arkitekt",5,"Q3 == [1-5]",5310088);
 +
 
 +
print(a);
 +
 
 +
OR
 +
 
 +
array a = Quota_new("Arkitekt",5,"Q3 == [1-5]");
 +
 
 +
print(a);
  
array a = Quota_new("male",5,"Qsingle == 1");
+
//{26,0,Arkitekt,5,Q3 == [1-5],5310088,,False,False,0,0}
  
OR
 
  
array a = Quota_new("male",5,"Qsingle == 1",34806989);
+
'''Availability'''
  
'''Availability'''
+
Version 5.8
  
Version 5.8
+
[[Category:Questionnaire_Functions]]
__NOTOC__
 
<!-- imported from file: 8019.htm-->
 

Latest revision as of 10:57, 3 January 2012



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 : Resource Id of questionnaire to which quota belongs. If it's empty, the project questionnaire context is needed

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("Arkitekt",5,"Q3 == [1-5]",5310088);

print(a);

OR

array a = Quota_new("Arkitekt",5,"Q3 == [1-5]");

print(a);

//{26,0,Arkitekt,5,Q3 == [1-5],5310088,,False,False,0,0}


Availability

Version 5.8