4 Replies Latest reply on Jun 27, 2015 6:40 AM by philmodjunk

# ValueList Question - determining the % of check boxes selected per record.

### Title

ValueList Question - determining the % of check boxes selected per record.

### Post

Hello,

I have a value list of items.  This value list is used with one field. The field is configured as a CHECK BOX using the value list.

What I want to do: calculate the % of boxes checked in each record.

What I can do: using ValueCount(), I can easily determine how many check boxes have been selected in each record.

Help: How do I calculate the total number of check box items possible (would be the same for all records)? Once I have that number, then I can easily calculate the % selected for that field in each record.

Thanks for the assistance.  Greatly appreciated.

Mark

• ###### 1. Re: ValueList Question - determining the % of check boxes selected per record.

ValueCount ( CheckboxField ) / ValueCount ( ValueListItems ( Get ( FileName ) ; "valuelistnameinQuoteshere" ) )

But the more you need to gather stats on the values selected, the more likely it is that you would be better off with a related table of records where a record is created each time a check box is selected and a record is deleted each time that it is cleared. This can be set up with a portal and a button in the portal row that looks and acts like a check box.

• ###### 2. Re: ValueList Question - determining the % of check boxes selected per record.

Thank you! I will try it.

• ###### 3. Re: ValueList Question - determining the % of check boxes selected per record.

So, I have used the approach and gone from "?" to "0".  Progress. :-)  But it's not giving me the total # of items in the value list used for the field. Below is the actual code I am using from you; at this point just looking to calculate the # of total items in the value list (decimal). I'll calculate the percentage next.  Value list is "ReasonsBidWon" which is comprised of 15 items.

ValueCount ( ValueListItems ( Get ( FileName ) ; "ReasonsBidWon" ) )

I must be missing something still.... getting zero when it should return 15 for all records regarding this specific field.