3 Replies Latest reply on Dec 28, 2011 8:05 AM by philmodjunk

    Record count



      Record count


      I have two fields each called trail_ID and obstacle_ID. I'm interested in finding how many obstacles (records) there are for a given trail?

        • 1. Re: Record count

          Assuming that you also have two tables called Trail and Obstacle and a relationship (TO) to the Obstacle table, then in the Trail table create a calculation field and insert the following formula:

          Count (Obstacle::obstacle_ID)

          result is a number and is unstored. 

          • 2. Re: Record count

            Let me be more specific. I have multiple trails with many obstacles. Each trail is numbered. I'm looking for an obstacle count for, let's say, trail 3.

            • 3. Re: Record count

              We need to know the relationship.

              If you have this relationship:

              Trail::TrailID = Obstacle::TrailID

              then Bumper's method will count the number of obstacles for a given trail record.

              You can also define a summary field in Obstacle as the "count of" TrailID. If you then place this summary field from Obstacle on the Trail layout, it will display a count of the number of related obstacle records.