Difference between revisions of "QAS getByUserResourceIds"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "= QAS_getByUserResourceIds = Get a list of qas by the specified users and questionnaire. '''Syntax''' QAS_getByUserResourceId(array userResourceIds, number questionnaireR...")
 
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
'''Syntax'''  
 
'''Syntax'''  
  
QAS_getByUserResourceId(array userResourceIds, number questionnaireResourceId)  
+
QAS_getByUserResourceIds(array userResourceIds, number questionnaireResourceId)  
  
 
'''Arguments'''  
 
'''Arguments'''  
Line 20: Line 20:
  
 
<source lang="javascript">
 
<source lang="javascript">
array userRId = {};
+
array userRId = {123,456,789};
number qnaireRId = ;
+
number qnaireRId = 123;
  
 
array a = QAS_getByUserResourceIds(userRId, qnaireRId);
 
array a = QAS_getByUserResourceIds(userRId, qnaireRId);
Line 29: Line 29:
 
}
 
}
 
</source>
 
</source>
'''Availability'''
 
  
Version 5.8.1 __NOTOC__
 
  
 
[[Category:Questionnaire_Functions]]
 
[[Category:Questionnaire_Functions]]

Latest revision as of 08:57, 5 September 2019

QAS_getByUserResourceIds

Get a list of qas by the specified users and questionnaire.

Syntax

QAS_getByUserResourceIds(array userResourceIds, number questionnaireResourceId)

Arguments

- userResourceIds: array of user's resource id.

- questionnaireResourceId: is a number expression. It is the questionnaire's resource id

Return value

array of QAS {QAS,QAS,QAS...} which have been assigned to the specific users on that qnaire. If no answer sheets exists then it will return an empty array

Example:

array userRId = {123,456,789};
number qnaireRId = 123;

array a = QAS_getByUserResourceIds(userRId, qnaireRId);
for(i for 0; a.Count)
{
	print(a[i].Id);
}