Difference between revisions of "Quota getQuotasByNameLike"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
[[Category:Questionnaire_Functions]]
+
{{HelpFiles}}
{{HelpFiles}}
 
  
==== Quota_getQuotaByName ====
+
==== Quota_getQuotasByNameLike ====
  
To get information of quota by name.
+
To get information of quotas by similar name.
  
 
'''Syntax'''
 
'''Syntax'''
  
array Quota_getQuotaByName(string quotaName[, number PQResourceId])
+
Quota_getQuotasByNameLike(string quotaName[, number PQResourceId])
  
 
'''Arguments'''
 
'''Arguments'''
Line 18: Line 17:
 
'''Return type'''
 
'''Return type'''
  
array
+
array of quota
  
 
'''Example'''
 
'''Example'''
 
+
<div>array a = Quota_getQuotasByNameLike("[Week 201621]",15530909);</div><div>for(number i = 0; i< a.Count; i++) &nbsp;print(a[i]);</div><div><br/></div><div>Result:</div><div>//{26,62550,[Week 201621] - A. Age 18-34,68,Age == [18-34] && D_Week == [201621],15530909,Original target: 68,False,False,17,4}</div><div>//{26,62551,[Week 201621] - B. Age 35-49,69,Age == [35-49] && D_Week == [201621],15530909,Original target: 69,False,False,43,9}</div><div>//{26,62552,[Week 201621] - C. Age 50-64,67,Age == [50-64] && D_Week == [201621],15530909,Original target: 67,False,False,97,25}</div><div>//{26,62553,[Week 201621] - D. Age 65+,47,Age == [65-99] && D_Week == [201621],15530909,Original target: 47,False,False,93,40}</div><div>//{26,62554,[Week 201621] - E. Region Hovedstaden,79,Region == [200] && D_Week == [201621],15530909,Original target: 79,False,False,74,23}</div><div>//{26,62555,[Week 201621] - F. Region Sjælland,37,Region == [201] && D_Week == [201621],15530909,Original target: 37,False,False,35,14}</div><div>//{26,62556,[Week 201621] - G. Region Syddanmark,54,Region == [202] && D_Week == [201621],15530909,Original target: 54,False,False,61,11}</div><div>//{26,62557,[Week 201621] - H. Region Midtjylland,57,Region == [203] && D_Week == [201621],15530909,Original target: 57,False,False,54,20}</div><div>//{26,62558,[Week 201621] - I. Region Nordjylland,26,Region == [204] && D_Week == [201621],15530909,Original target: 26,False,False,25,10}</div><div>//{26,62559,[Week 201621] - K. Gender - Mand,126,D_Week == [201621] && &nbsp;Sex == [1],15530909,Original target: 126,False,False,135,36}</div><div>//{26,62560,[Week 201621] - L. Gender - Kvinde,127,D_Week == [201621] && &nbsp;Sex == [2],15530909,Original target: 127,False,False,115,42}</div><div>//{26,62561,[Week 201621] - M. Total,250,D_Week == [201621],15530909,Original target: 250,False,False,250,78}</div>
array a = Quota_getQuotaByName("Arkitekt, textilindustri",5310088);
 
 
 
print(a);
 
 
 
//{26,5915,Arkitekt, textilindustri,1000,Q3 == [5] ,5310088,,False,False,9,1}
 
 
 
 
<br/>'''Availability'''
 
<br/>'''Availability'''
  
 
Version 5.8 __NOTOC__
 
Version 5.8 __NOTOC__
 
<!-- imported from file: 8021.htm-->
 
<!-- imported from file: 8021.htm-->

Revision as of 10:18, 11 November 2016


Quota_getQuotasByNameLike

To get information of quotas by similar name.

Syntax

Quota_getQuotasByNameLike(string quotaName[, number PQResourceId])

Arguments

- quotaName : the name of new quota.

- PQResourceId : Resource Id of questionnaire to which quota belongs. If it is empty, the project questionnaire context is needed

Return type

array of quota

Example

array a = Quota_getQuotasByNameLike("[Week 201621]",15530909);
for(number i = 0; i< a.Count; i++)  print(a[i]);

Result:
//{26,62550,[Week 201621] - A. Age 18-34,68,Age == [18-34] && D_Week == [201621],15530909,Original target: 68,False,False,17,4}
//{26,62551,[Week 201621] - B. Age 35-49,69,Age == [35-49] && D_Week == [201621],15530909,Original target: 69,False,False,43,9}
//{26,62552,[Week 201621] - C. Age 50-64,67,Age == [50-64] && D_Week == [201621],15530909,Original target: 67,False,False,97,25}
//{26,62553,[Week 201621] - D. Age 65+,47,Age == [65-99] && D_Week == [201621],15530909,Original target: 47,False,False,93,40}
//{26,62554,[Week 201621] - E. Region Hovedstaden,79,Region == [200] && D_Week == [201621],15530909,Original target: 79,False,False,74,23}
//{26,62555,[Week 201621] - F. Region Sjælland,37,Region == [201] && D_Week == [201621],15530909,Original target: 37,False,False,35,14}
//{26,62556,[Week 201621] - G. Region Syddanmark,54,Region == [202] && D_Week == [201621],15530909,Original target: 54,False,False,61,11}
//{26,62557,[Week 201621] - H. Region Midtjylland,57,Region == [203] && D_Week == [201621],15530909,Original target: 57,False,False,54,20}
//{26,62558,[Week 201621] - I. Region Nordjylland,26,Region == [204] && D_Week == [201621],15530909,Original target: 26,False,False,25,10}
//{26,62559,[Week 201621] - K. Gender - Mand,126,D_Week == [201621] &&  Sex == [1],15530909,Original target: 126,False,False,135,36}
//{26,62560,[Week 201621] - L. Gender - Kvinde,127,D_Week == [201621] &&  Sex == [2],15530909,Original target: 127,False,False,115,42}
//{26,62561,[Week 201621] - M. Total,250,D_Week == [201621],15530909,Original target: 250,False,False,250,78}


Availability

Version 5.8