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

Calculating # of Value List Instances

Featured Replies

Hello there, i'm requiring your help yet again.

I have a database of 313 graduates that lists their current area of employment via a value list

i.e. archival, a/v tech, multimedia etc.

I would like to have a layout that calculates and tells me how many of my graduates are in each field.

i.e. Archival - 1, A/V Tech - 8, Multimedia - 16

I thought that it would need to be done by some sort of if loop, but i'm unsure how to go about implementing that.

Your advice is greatly appreciated!

Check out the post about counting. These guys answered my exact same questions. Drop me a line if you would like to see how I tackled the problem.

http://fmforums.com/forum/showtopic.php?tid/169124/post/172804/hl/+albud1962/#172804

I used a portal database to display the results of the counting. I used zipcodes as the common key.

sample.zip

  • Author

Thanks for your quick reply! I'll try that out!

  • Author

Actually I am a but confused, how is it I would use the count function?

I'm unfamiliar with it, sorry.

If my database is called School, and the field I would like to count is called Employment, and the list item from the Employment field I would like to count is "Archival" how would I do that, something like:

Count(Employment::Archival) ?

The Count() function only checks if the field has a valid, non-blank value. ANY value. To count SPECIFIC values within a field, you need to break them out into separate fields.

If you have many possible values, you can use a repeating field for the break out, then use a summary field to count (actually, sum) the repetitions individually. See the demo I have posted in this thread.

no it would be

count( school:employment)

In your portal, lets call it talley, with a field called employment. Then talley:employment would be related back to school:employment. Talley:employment would have the career types you wished to count. I am assuming the categories would be limited to at the most 10.But if that is not the case, the way you could insure that you had all the different employment types in talley:employment would be to make it unique, then import the school:employment field into Talley. There would be only one listing for each category of employment. This is basically what I did with the zipcode example. I hope this is understandable. I have some more example files which might make this a little clearer.

  • Author

Hello

Unfortunately I am not up and running with FM 7 yet so I am unable to open the file. I already have them all listed in a Columnar Report if that helps? I'm unsure how to use repeating fields to break it out...

Ooops. Sorry, haven't noticed your version. I have never used 6 so I don't know it will work. Probably not (check in Define fields, when you define a summary field of type Total, if you have the option to summarize repetitions individually).

If not, you have two options:

1. Create a calculation field for each category, that will return 1 if the record belongs to that category. Then a summary field for each category (Total of calculation field).

That's a lot of fields, so you'd probably would be better off following albud's suggestion, which in a nutshell is:

2. Create another file, Categories, where each record is a category. Define a relationship from Categories to your School file, so that

Categories::Category = School::Employment

In the Categories file define a calculation field =

Count ( School::PersonID )

This will return the number of graduates in that category.

  • Author

Thank you, I will give that a try and see if I understand correctly and whether I can do it without running into any snags!

Thanks again!

Take a look at the file I posted here

http://fmforums.com/forum/showtopic.php?fid/31/tid/164109/pid/174268/post/last/#LAST, example.zip. It was written in fmp4.0 so you should be able to follow it. The reason why I checked for dups was to avoid totaling given zipcode more than once.

  • Author

I apologize for being so unbelievably daft, but I still have not figured out how to do this, even with all of your examples...

..I'm sure I am just overlooking on small piece of information.

I have now upgraded to FileMaker 7 (and I can't even find the define fields command...!)

File > Define Database

Yep, they moved them a bit from vs. 6, combining Define Fields and Define Relationships. :wink2:

  • Author

Thank you!

I had just found it myself and then felt stupid about posting about it, hah hah!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.