OptimusPrime Posted January 14, 2011 Posted January 14, 2011 Brief question: Got an object. One field (field A) is a checkbox set. Another field (field B ) is a calculation. What I need, and can't seem to figure out, is this: In the calculation in field B, for filemaker to count the amount of checkboxes. I.e. if three boxes are checked, return value 3, if four are checked, return value 4, etc. any idea how this is possible? Thanks! OP
OptimusPrime Posted January 14, 2011 Author Posted January 14, 2011 Try = ValueCount ( Field A ) That didn't work... any other ideas? Maybe it's impossible with FM?
bcooney Posted January 14, 2011 Posted January 14, 2011 If that didn't work, then your checkbox field is not defined as you first described it. A field formatted as a checkbox set, with a value list of choices will contain a return-delimited list of values, one for each item checked. Place a copy of this field on your layout, formatted as an Edit box so that you can see the values in the field. How do you define your field and the value list that is assigned to it?
comment Posted January 14, 2011 Posted January 14, 2011 didn't work I never know what to reply to that... Does this work for you? ValueCount.zip
OptimusPrime Posted January 14, 2011 Author Posted January 14, 2011 I never know what to reply to that... Does this work for you? Yes it does! Thanks! If that didn't work, then your checkbox field is not defined as you first described it. A field formatted as a checkbox set, with a value list of choices will contain a return-delimited list of values, one for each item checked. Place a copy of this field on your layout, formatted as an Edit box so that you can see the values in the field. How do you define your field and the value list that is assigned to it? From the example which was posted by consultant, I found my mistake - the checkbox was fine, i.e. it was in the same format/definition as the one in the uploaded file. The issue was that I had field B defined not as a calculation, but as a numeric field which I had validated by calculation (which, oddly, worked for other fields, which were numeric. I.e. the calculation of (field c) x 2 worked perfectly. But valueCount did not.) Thanks - it works now! OP
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now