Counting related items that match criteria
I have an app called invoices which has a number of related items in app B.
Each of these services falls into one of 3 categories and on the invoice I would like to calculate the total number of related items in each category.
Thank you for any help provided!
-
Hi Jacob,
the code looks ok, but you don't need the else-part:
var type = @All of Key Stage;
var count = 0;
for(var i = 0; i < type.length; i++){
if(type[i] == "KS3"){
count++
}};
countIs Key Stage a single or a multi choice category? If multi choice:
if(type[i].indexOf("KS3") > -1 ){
Rainer
Please sign in to leave a comment.
Comments
2 comments