3 Replies Latest reply on Oct 1, 2009 8:55 AM by philmodjunk

    Counting checks in check boxes



      Counting checks in check boxes


      On my records I have a series of check boxes lets just say for color, blue, green, red..... If I need to know how many records had been check green is there a way to get this number?



        • 1. Re: Counting checks in check boxes
             You can perform a find in that field for "green"
          • 2. Re: Counting checks in check boxes
               Right but what if I wanted a layout that showed a total count how many blue how many yellow and represented it in a number?
            • 3. Re: Counting checks in check boxes

              You can do this with relationships and the count(relatedtable::CheckboxField) function in a calculation field.


              Place "Green" in a field--this can be a text field or a calculation field that returns "Green". Field can be global or local.


              Define a relationship linking this field to your checkbox field. This can be a selfjoin or from a different table.


              Now put the above calculation  in place and you'll get a count of all records where "green" is checked.


              Additional enhancement: If you don't want to create a whole series of separate calculations and relationships, create a new table with two fields, Color, ColorCount. Link Color to your check box field and define ColorCount as the above calculation. Create one record for each value in your checkbox field, storing the matching value in Color.


              Now display these records in a portal, or on a list/table view layout based on the new table.