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 4106 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a list of records in a table (CONDITIONS) shown on a list view. One of the fields is a checkbox when checked sets a value "Yes" to the field.

I needed a calculation that shows the number of records flagged.

 

What I tried:

 

  1. List of Records shown are based on a TO (Layout_Conditions)
  2. A field called "Flag" in each record is displayed as a checkbox to set a value "Yes"
  3. Created another TO based on CONDITIONS base table and named it "showCount_ofChecked"
  4. Created a global field gCheckedState and set it to "Yes"
  5. Created a self relationship between Layout_Conditions::gCheckedState and showCount_ofChecked::Flag
  6. Created a calculation field cCount_ofCheckedRecords(global, calculation, NumberResult) to count(showCount_ofChecked::Flag) from the context of Layout_Contacts

 

But it does not work. cCount_ofCheckedRecords is always 1 whether one or several records are flagged.

 

Any suggestions how to fix this. Thanks

Posted

Why don't you simply use a summary field, defined as Count of [Flag]? This will work for both the found set and - if you prefer - across a relationship.

 

 

---

BTW, a smarter way to use a flag field is to make it a Number field and attach a value list of "1" instead of "Yes".

Posted

Why don't you simply use a summary field, defined as Count of [Flag]? This will work for both the found set and - if you prefer - across a relationship.

 

 

---

BTW, a smarter way to use a flag field is to make it a Number field and attach a value list of "1" instead of "Yes".

 

When I used the Count of [Flag] summary field, I got the magic number 17 all the time ?! Couldn't figure out where that came from.

 

Thanks for pointing out to use number 1 instead of "Yes". Flipping the Flag is much easier now.

Posted
When I used the Count of [Flag] summary field, I got the magic number 17 all the time ?! Couldn't figure out where that came from.

 

Depends on where you used it (i.e. in which context).

 

Do you want to count the number of flagged records in the current found set, or the number of flagged records in the entire table?

Posted

Yes ! Thank you. It reports the correct result in the current found set. That is when I do a find in List view and flag records, it works fine.

But what I need is the number of flagged records in the entire table.

 

I tried Running count, it --kinda-- works. I use a script attached to an invisible rectangle of height 44pixels to flip the flag (for use on an ipad)

The dataviewer shows the correct count when clicking and holding the mouse but the result reverts to 1 on releasing the mouse ??

Posted
But what I need is the number of flagged records in the entire table.

 

Then you'll need to count across a relationship. There's probably a simpler method to arrange this than what you have described in your opening post, but I'd like to stick with for the moment because AFAICT it should work - see the attached file.

 

CountStatus.fp7.zip

 

If it doesn't, you must either have another thing going on in there or I have misread your description (it is kind of difficult to read).

This topic is 4106 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.