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.

Sorting Relationship

Featured Replies

I have a database related to another database that I want to sort the total summary of records.

Example i have a database that I use to keep track of events that take place that this record participates in. I have the database count the number of events that person is attending.

In my primary database I have the summary field on it and it will tell me how many events that the person attended.

When I sort with this summary field it does not sort right It will partially sort it and there will be a record or two that is in the wrong place.

Is there a way to sort these fields that I am missing.

Thanks in Advance.

I see you are using v7...

Here is a good explanation pertaining to 8.5. Although, I think the principles will work the same. Didn't use 7 very long.

Edited by Guest

  • Author

Still do not understand why my total will not sort right.

I have a database related to another database that I want to sort the total summary of records.

When you say database, do you mean FM file? In FM7, the file is the database and it can consist of multiple data tables.

Example i have a database that I use to keep track of events that take place that this record participates in. I have the database count the number of events that person is attending.

How do you count? Relating People to Events thru a join table, then using the Count ( ) in a calc field in People?

In my primary database I have the summary field on it and it will tell me how many events that the person attended.

Summary field? Not a calc?

When I sort with this summary field it does not sort right It will partially sort it and there will be a record or two that is in the wrong place.

Are you in a list view of people at this point? I don't see the need for a summary field at all.

  • Author

Yes I am using the count in the calculation. It is just counting the id of the record. Each time I put in a new event the FM Data file inserts a new ID.

Two related Tables one file. One is the persons name. the other is the events that he attend. and I have them counted with a calculation. I have moved that field on the Persons layout then I made a new report off of the persons table and I sort it by the events that were attended.

Some of the records sort right and some do not. If I have 900 Records 10 might be in the wrong spot.

So, you're counting, Count ( Person to Event by PeoID::PeoID)?

"I have moved that field on the Persons layout"

:

Is the result of your count ( ) a number? Can you post a screen shot?

Still do not understand why my total will not sort right.

Sorry, I was going by the idea you were sorted a "summary field". I remember, a while back, having some issues with sorting summary fields anywhere but a Sub-summary part.

It may be a good idea to do the report the other way (which was the principle behind the link).

A report based on the Events table, sorted by the PeoID. Have the persons info from the People table in a Sub-summary part, no body. That should give you what you are looking for, if I understand what you are trying to do.

Edited by Guest

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.