Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Quota new: Difference between revisions

From Catglobe Wiki
Cg_pham (talk | contribs)
No edit summary
No edit summary
 
Line 17: Line 17:
- 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'''  
Line 148: Line 148:
'''Example'''  
'''Example'''  


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


OR  
OR  


array a = Quota_new("male",5,"Qsingle == 1",34806989);  
array a = Quota_new("Arkitekt",5,"Q3 == [1-5]");  
 
print(a);
 
//{26,0,Arkitekt,5,Q3 == [1-5],5310088,,False,False,0,0}
 


'''Availability'''  
'''Availability'''  

Latest revision as of 09: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