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

Button Tip - Need Help with Counting Fields

Featured Replies

I would like to post a tip that has been very handy to me.

It's not rocket science, but it took me a while to stumble onto it.

I think it might be useful to others.

What I have done is produce a button that assigns workers names to a task list. The button itself changes according to who is available to do the task. If Elvis is in the building, Elvis is assigned to Worker 1. If Elvis is on vacation, somebody else's name shows up on that button. This button could be pretty handy for someone managing tasks at a workplace with more than one shift of workers.

What I would like to add to this is some ability to count how many tasks have been assigned to each worker. I'm trying to figure out what percentage of the load each worker carries.

My question: [color:red]Is there a way to interrogate the ACTIVITY TABLE to find out how many times a particular value from the WORKER LIST table shows up.

For example: Assume Worker 1 from the WORKER LIST table is named Billy Bob. Is there a way to keep track of how many tasks Bill has been assigned in ACTIVITY TABLE?

Any ideas?

Jarvis

Test_countfind.fp7.zip

I downloaded your file and normally the calculation would very simple. All you would do is create a calculation with the following formula:

Count(Activities::Match)

Unfortunately, this won't work because you have all your workers in different fields on the same record. You need to place the workers in separate records in the same field. Then, the calculation above will work without adding any additional relationships.

I also modified your file to adhere to sound relational rules but I had to make a lot of changes. It did obliterate your nifty scripts for copying the worker over but I fixed those as well by adding a popup menu which is the best way to populate a foreign key. Enjoy exploring the changes. To better understand relational design purchase the Profesional Foundatio Training Series III book and CD ROM at the filemaker.com web site. It's will really help you.

Test_countfind2.fp7.zip

  • Author

John,

Thanks for the heads up!

Your last book on Scriptology was very useful to me.

I look forward to buying your new product.

Jarvis

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.