1 Reply Latest reply on May 28, 2012 6:53 PM by johnhorner

    Counting the number occurrences of a condition within a table

    ahcho

      Title

      Counting the number occurrences of a condition within a table

      Post

      Hello!

      I've wasted a good 3-4 hours on this problem (I've learned alot about different functions but haven't solved it yet.) Please see the screenshot attached.

      All I want to do is to find out the # of rows that satisfy this condition

      _kf_SiteID = "" (or empty)

      Read = "no"

      _kf_EmployeeID = 1

      It should be 2...I can see it, but I can't calculate it. That's all I want to do...Yell

      Aaron

      Untitled.jpg

        • 1. Re: Counting the number occurrences of a condition within a table
          johnhorner

          hey aaron... 2 thoughts:

          1. if those three fields are not unstored calculations they can be used to define a multi-key relationship and then you could simply use the count function to return the number of related records.

          2. alternately, you could make a script in which you would enter find mode, set the value of those fields as needed (empty, "no", and "1"), perform find and use the get ( foundcount ) function to give you the count of qulaifying records.  you could then either temporarily display that value in a custom dialog or set a field to the found count value to display this count.

          and i'm sure there are other ways too... hope that is helpful.