count & sum of items that fits specific parameters
Hello,
I have a 2-part Calculation question:
PartA:
In App-A, I want a total count of how many "items" from App-B fits a specific parameter, that references App-A. below is the code I used, but getting back "0"
var cat = @All of Estimate Won?;
var stat = @All of Work Status;
var count = 0;
for(var i = 0; i < cat.length; i++){
if(cat[i].indexOf("won") > -1 && stat[i].indexOf("closed") > -1){
count += 1;
}
}
count
PartB:
I want the sum of a field, "Sum of QBO Total" from App-B that fits a specific parameter, that references App-A. below is the code I used.
if ((@All of Estimate Won? == "won") && (@All of Work Status == "Finished"))
{@Sum of QBO Total;} else { 0;}
____
App A: Global Contacts
App B: Whiteboard
- App B References App A via reference field.
I made a previous post asking about the same problem, but I don't think I had enough details. I really appreciate your help on either post!
Please sign in to leave a comment.
Comments
0 comments