Jump 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.

Featured Replies

Hi,

I'm a newbie coming from MS Access so I'm used to writing queries. My question is I don't see how to count the number of occurrences in one field. For example, in one field I have a drop down selection of 16 choices. I want to be able to total how many occurrences of each of the 16 choices happen in one field. (i.e. 5 reds, 4 blues, 10 oranges... all in the field categor "color"). In MS Access I could write a query to do this and it would be easy... in FM I am still getting used to the Find... (which is nice to do certain things)

Thanks... Vandy

Try this:

PatternCount ( color ; "red" ), etc. for each class. Then, for the found set, you would want a Summary Field, Total of PatternCount ( color ; "red" ), etc. Hopefully, your colors are distinct!

  • Author

Can you elaborate a little on this... I'm sort of confused. Are saying make a field called patterncount ? I don't get it.... sorry I'm a newbie

The field would be a calculation using the function PatternCount, as Transpower has described.

  • Author

I'm sorry, I've never seen the PatternCount function before. Do I have to make a patterncount summary field for each category in the field? Then summarize it?

Each type will have an associated PatternCount calculation field and summary field, defined as the total of the calculation field.

Here's a quickly-assembled sample file for doing this using two repeating fields. Go to the Summary layout to see the results. Note that summary fields only act on the found set, so all records must be found before the totals will be accurate for the table.

CountColors.zip

Create an account or sign in to comment

Important Information

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

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.