Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Count of settings to use in a calculation

Featured Replies

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

Try =

ValueCount ( Field A )

  • Author

Try =

ValueCount ( Field A )

That didn't work... any other ideas? Maybe it's impossible with FM?

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?

didn't work

I never know what to reply to that...

Does this work for you?

ValueCount.zip

  • Author

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.