1 Reply Latest reply on Jan 6, 2012 9:56 AM by philmodjunk

    Total Value LIst CheckBoxes



      Total Value LIst CheckBoxes


       I would like some direction, because I'm sure this question
      may have already been asked, (but I can't find an answer).

      I have Fmk 11.
      I've created from "Value List" with a "(CHECK BOX holding (6) items to chose from).

      I am in need of finding a way to Total / count the number of times a ck box "ITEM" was chosen.

      How difficult is this to do, or where would I look for more info. on getting an answer?








        • 1. Re: Total Value LIst CheckBoxes

          WIth multiple value checkbox groups (6 in your case), getting a count for a set of records that tells you how many times each value was selected is complicated as all the selections are physically stored in one text field with returns separating each value. To further complicate things, the values are listed in the order the user clicked them. Thus, in one record you might have: value1¶value 2¶value 3 and in another: Value 3¶Value 1¶Value 2--even though they look the same with the checkbox format. (You can watch this happen if you make a copy of this field, place it next to the check box formatted copy and then return it to "edit box" format in the inspector.)

          You have two options:

          1) Define 6 calculation fields such as:

          cValue1Flag: If ( ValueCount ( FilterValues ( YourTable::checkboxfield ; "value 1" ) ) ; 1 )

          For each such calculation field, change teh value in quotes to a different value in your value list.

          Then 6 Summary fields can sum or count these flag fields to get your total counts for each selected value.

          2) Replace your checkbox group field with a portal of related records with a single value selection box and a record for each value in your value list. Use a portal to display the records and it looks just like a vertically oriented checkbox group if you make the portal borders invisible. This requires using a script to generate the list of related check box records for each new record you create in your original table. With this approach, you can set up a summary report with a on a layout based on the table of related values that uses a single summary field to count the times each value was selected. This is more work to set up and manage, but more flexible should you need to make periodic changes to the list of values that appear in the check box.