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.

Need related value with highest count

Featured Replies

Hi there,

I have been trying different methods to achieve the following - and none are correct as far as FMP 11 goes. Perhaps someone can help me ?

I need to be able to tell which values in a relationship have the highest count.

Parent record = Owner

Child record = Shop

Child record = Category

Child record = Items

If in the related items the carrots have sold the most, I need the Parent Owner to know this.

Example data:

Apples

Apples

Carrots

Carrots

Carrots

Carrots

Carrots

Carrots

Dried Fruit

Dried Fruit

The value I want to see is Carrots. The parent record has to be able to know this.

The ER is as given above - i.e. there are 2 join tables between Owner and Items

Any help greatly appreciated.

Many thanks in advance

Glorifindal

This part is not clear:

The ER is as given above - i.e. there are 2 join tables between Owner and Items
  • Author

Sorry -

The items table is a great great grandchild of the Owner table - not just a child

Owner - shop - category - Item

Two other tables between Owner and Item

Hope that is clearer

Maybe... Is there a table of item types - where Apples, Carrots and Dried Fruit would be unique records?

  • Author

Actually no - item is part of the line item table

Are you really still stuck in FileMaker 8 or are you using something more recent?

I'd probably do this with a custom function, but here's another way using the so-called Ugo method. I've only done grandchildren, but it's the same thing for any generation.

Of course, this won't work if a store clerk misspells "Carrots"; that's something that doesn't seem right with the system you describe.

MostFrequentGrandchildU.zip

  • Author

Hi guys,

sorry, I fell asleep (up in Scotland)

@BruceR - actually, FMP 11 - need to update - sorry

@Comment - nice one - I'll have a look and get back.

Many thanks

Glorifindal

Edited by Guest

FMP 11 - need to update - sorry

Please take care of this right away.

Go to the Menu above, Click on "MY PROFILE" >> "Control Panel" >> "FileMaker Questions"

TIA

Lee

  • Author

Thank you very much - works fine

I would also prefer a custom function - but this will do for the moment

kindest Regards

Glorifindal

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.