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.
Thank you! I will try it.
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.
Thank you for your guidance!
Two reasons it might fail:
a) "ReasonsBidWon" might not be the exact name of the value list. Check and be sure. Better yet, copy the name of the value list to the clipboard from Manage | Value lists in order to paste it into your calculation.
b) You might have a file name with an extra period. There's a known bug were Get ( FIleName ) used inside this function fails to return the actual file name if your database file name is something such as MyDatabaseSolution.v3.fmp12. If this is the case, use the name of your file in quotes in place of Get ( FileName ) and be careful not to rename your file without updating this function.