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.

Newbie question re count function

Featured Replies

  • Newbies

I have a field that has 5 possible text values.

How do I perform a count to see the total number of times each value appears in the db?

Create a calc flag field for each possibility:

TextA_flag = if (patterncount ( myField; "TextA",1,0)

then use a summary field to total each flag field.

  • Author
  • Newbies

Thanks for the reply

What u are saying is that for each value I want to count, I will have to create two new fileds?

Yes. Are you looking from one table to a child table for the counts? If so, you could use relationships to see all counts at once.

  • Author
  • Newbies

It's all in one table.

The main table contains bio data of people...names, dob, address, race, employment, etc.

I would like to be able to count the number of each race among other counts.

This topic may help, it uses relationships to calculate the counts. This is much better than summary fields, since you can see these counts without running a report. See this post

I also need to say that matching on data and not on an ID is not a good idea. For example, if you change the value list from "TextValue" to "TextValue2," it will not update pre-existing values and so your counts will not be 100% accurate. However, if the user was really entering ID=2 then you could change the TextValue that shows for ID=2 and the value stored is still ID=2 and your counts will be 100% accurate.

I guess that's just a long-winded way of saying, "match on ids and not on text..or live to regret it!"

Edited by Guest
added speech about id matches, lol

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.