1 Reply Latest reply on Oct 8, 2010 2:11 PM by philmodjunk

    I would like to make a "counter"

    GregoryIngogliga

      Title

      I would like to make a "counter"

      Post

      I am working in file maker pro and i have a little bit of scripting experience, never the less i can not figure out how to make a counter on my heads up display. I would like to have a counter that displays a certain field status on a counter. For example i would like to see how many entries i have made in the past 14 days how many of which are "pass" "reading" and how many are "recommended." If there is any way to do this i would appreciate the help.

      I would like the counter to look like this:

      Entries:

      Pass:

      Reading:

      Recommended:

      And then display the # values accordingly for the past 14 days. 

        • 1. Re: I would like to make a "counter"
          philmodjunk

          No scripting required. Three relationships and three calculation fields that rely on the Count() function can return these values. With a little ingenuity and a portal, a single relationship can work for all three totals and make it easier to change this down the road if you need to.

          Let's assume you have a table called "projects" and a field named ReviewStatus that holds one of the above three values.

          Define a new table called StatusSubtotals with at least the following fields:

          Status (text)
          cDate14 (unstored calculation, Get ( currentDate ) - 14 )

          Set up a relationship to your Projects table like this:
          StatusSubtotals::Status = Projects::ReviewStatus AND
          StatusSubtotals::cDate14 < Projects::ReviewDate

          Now add one more field to StatusSubtotals: cTotals as Count ( Projects::ReviewStatus )

          Now leave Manage | Database, go to the StatusSubtotals layout and create three records, entering Pass, Reading, and Recommended respectively into the StatusSubtotals::Status field.

          If you place a portal to these three records on your layout, (use the x operator to that all 3 are shown for any record in the table), you'll see your three subtotals.