Questionnaire getCountQASs

From Catglobe Wiki
Jump to: navigation, search



Questionnaire_getCountQASs

- This script is used to get the number of QASs which belong to a specific group of a specific questionnaire

Syntax

number Questionnaire_getCountQASs(number projectQuestionnaireResourceId, number groupResourceId, bool includeTest [,bool completed] [, number status][, array startPeriod, array endPeriod])

Arguments

– projectQuestionnaireResourceId: the project questionnaire resource id

– groupResouceId: the group resource id, this parameter is required but I can use the constant called GROUP_RESOURCE_ID_ANY (value = -1) in case I have no group is used.

– includeTest: Are the test QASs counted?

– completed (optional): Just count on the completed QASs counted or not. DDefault filter is to get all the RPQs regardless of its complete status

– status (optional): the status of QASs. Default filter is to get all the RPQs regardless of its status

– startPeriod and endPeriod: the period that those QASs is completed (QAS's end_date). Default filter is to get all the RPQs regardless of its end date

Return type

Number

Example

array end = getCurrentDateTime();

array start = {2005,6,15,0,0,0,0,33,40};

number a = Questionnaire_getCountQASs(654321,123456,false,true,1,start,end);

print(a); // 34

With :

false : Not include testtrue : rpq completed1 : rpq status normal

Note

If the completed parameter was false, then the startPeriod and endPeriod parameters will be ignored.

Availability

Version 5.8