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.

Featured Replies

Table A:
StartingNumber 
EndingNumber 
Active

Table B:
NumberOne: Calc=1
CalcNumber
Count

I created a relationship TableA::Active to TableB:NumberOne, but I am struggling to finish.
The goal is to get a Count of all Active people matching the CalcNumber - So each record where the CalcNumber >= StartingNumber and CalcNumber <= EndingNumber.  The screenshot show the issue592502c583edc_ScreenShot2017-05-23at8_36_27PM.png.bb98e09a2fc1b4109254b8463ad83af2.png592502c5247a9_ScreenShot2017-05-23at8_35_49PM.png.834a943a0b90089a3d971245d289ddbb.png

Hi there

You are pretty close in what you describe already, you just need to setup the relationship exactly as you describe, then create a calc field in table A to summarise the result.

Since the advent of ExecuteSQL most expert developers would use an SQL statement to get the result you need without using a relationship on the graph. Often we try to reserve relationships on the graph for the data connections and to show portals, rather than to perform summary's in this way, but for smaller and simpler solutions, it is perfectly fine.

I've enclosed an example file if that helps and a screenshot of the results. I just created two FileMaker windows to show both tables side by side.

 

Example.fmp12

example.png

5 hours ago, crazybake said:

The goal is to get a Count of all Active people matching the CalcNumber

I find this very confusing. Which one of your tables is the table of People? The Active field is in Table A, but the CalcNumber field is in Table B - so what exactly does  "matching the CalcNumber" mean?

  • Author

To make the request simple, I did not include all fields.

Table A is my Contacts Table that has all of the personal information, including the Active field, Starting and Ending Numbers.

What I want to do is Count the records where the Active field is checked, but only when CalcNumber >= StartingNumber and CalcNumber <= EndingNumber for each record. The issue in my screen caps above is that for the first record, I want it to stop counting after it reaches the EndingNumber

24 minutes ago, crazybake said:

What I want to do is Count the records where the Active field is checked, but only when CalcNumber >= StartingNumber and CalcNumber <= EndingNumber for each record.

Does the attached work for you?

Example2.fmp12

  • Author

That is it... and I had thought that was the first relationship I created.

Thanks for the simple solution.

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.