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.

Want Second Table Occurrence to be "Limited"

Featured Replies

I thought I was doing the right thing, now I'm wondering if I've led myself down the wrong path.

I have a very large table in my file. I have created a field to indicate which of those records I want to use for a specific purpose. I was hoping that a self join on a second table occurrence would do the trick. No luck.

In my sample file below I have one table that occurs twice.

The "value" field is what I'm starting with.

The "calculate" field has the calculation. In this example I'm returning the value of "value" in calculate if the value is greater than 10.

The second table occurrence is called "testing 2". The layout for "testing 2" is "testing Copy".

I've joined the two tables together. Calculate on the left and value on the right.

My hope was that when I displayed "testing 2" on the layout "testing Copy" that I would only see the records that met the relationship criteria. In this sample I'm expecting 6 records but I'm getting all 16.

Yes, I guess I could do this with a find, but I'm going to be relating other tables that will NOT be self joins to these "limited" table occurrences.

Where has logic left me?

Thanks

Christopher

testing.fp7.zip

"Where has logic left me?"

At a pretty basic point.

There is no such thing as a limited table occurrence, and if you pursue it you will have to do it with finds or portals or perhaps a few other methods.

In many SQL systems there is the concept of a view that does what you want. But FileMaker doesn't have that.

You can create what I call a RAT (Record Access Table) that holds the value subset you want and has a relation to the main table, see attached.

testing.fp7.zip

Edited by Guest

  • Author

Thank you, Bruce.

How do you automate the creation of the record in the RAT table? It looks like it needs to be manually entered in the main table. Is that right?

Thanks again

Christopher

The RAT records can be set - as in the example - to use an auto-create relation. You would find the source records and use a looping script to set a value in the RAT record, thus creating it. It is possible you might also need to deal with RAT records that no longer have a corresponding source record.

  • Author

Thanks!

Am I right in guessing that deletion of the RAT value in the main table won't delete the record in the RAT table?

Christopher

It isn't clear what you mean. Clearing a value in one table does not change (non-calc) values in another table. But if you mean deleting a RECORD in one table - it depends on how you have defined the relationship.

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.