Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6522 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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?

Posted

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.

  • Newbies
Posted

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?

Posted

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.

  • Newbies
Posted

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.

Posted (edited)

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

This topic is 6522 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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