Get a count of item
Hello, is it possible to get the number of item of a precise app that match a precise condition. For example, if I have an app "A1" which have a field "F1" can I get the number of item "A1" which have a "F1=f" (f being a constant I chose)

  • Hi, the number you want you can get with a report in the App view: Filter in field F1 for "f", create report, count items. A calculation field can only calculate with data from the current item or from related items. If you really need that number in a calculation field in A1 you have to use a (not so nice) workaround: Create a "Helper-App" with one item "Count" and relate all A1 items to this item "Count" . There you can create a calculation field, which counts all related A1 items with F1 = f. var a = @all of titleField AppA1; var F1 = @all of F1; var F1f = []; for(var i = 0; i < a.length; i++){ if(F1[i] == "f"){ F1f.push(a[i]); } }; F1f.length In A1 you need a calculation field which gets this number from the Item "Count": @sum of count // gets it in number format so you can use it for further calculation: @all of count.join() // gets it as a text string. Rainer
This question is closed.