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.

Preserve Portal Filter in Export to Excel

Featured Replies

I have a layout which consists of a few fields and then a portal with about 10 other fields. I'm using a Portal filter so that I omit data were field x = 'Cancelled'.

I have an export script which exports all data from this layout. However I don't wish to export the data that has been eliminated from display with the portal filter. At the moment I'm getting all rows in the export, including the ones where field x = 'Cancelled'. So my export doesn't match what is being displayed in the layout.

If I try to do a Set Field to a portal field within my find script it doesn't seem to have any impact.

This is it. The final step to getting my export working 100% correct. Everyone's help so far has been amazing. Thank you.

Since you only want part of the child records (those showing in the filtered portal), your export should be from the child table. Your script might look like:

Go To Portal Row [ First ] ... this is your filtered portal

Go To Related Record [ show only related records from child, match current record only, using layout based upon portal table ]

This will isolate the records in your portal for export. :)^)

  • Author

Thanks for the response. I'm definitely missing something though. I have no problem admitting that this is a PEBKAC error.

Ignoring the export functionality completely for a minute.

In my layout with the portal I'm using the Portal Setup->Filter Portal Records and setting a criteria on field x = Cancelled.

However, if I don't have that Portal Filter in, and I simply try and do a Find->Omit (within the portal) field x = Cancelled... nothing happens. If I try to do a Find using any criteria in any of the portal fields I'm still just getting a full result set. My search criteria is ignored.

I'm clearly not understanding some basic functionality of how FileMaker, specifically portals, work.

Thank you once again. My public display of idiocy is getting embarassing.

A portal shows related records, regardless of any found set. When you are searching in a portal, you are searching the parent table. Searching for "x" in the Child::Canceled field will find all parent records that have at least one canceled child record.

  • Author

Searching for "x" in the Child::Canceled field will find all parent records that have at least one canceled child record.

Thank you very much. That was a very clear explanation and definitely clarifies my confusion on the expected results with the method I thought I could use to achieve them.

  • 6 months later...

I ran into the same problem, but there's a very easy solution to this. Instead of exporting records, just chose "Save Records as Excel". This will output whatever is on your screen, directly into a sheet. Including filtered portal records.

I'm using a Portal filter so that I omit data were field x = 'Cancelled'.

I have an export script which exports all data from this layout. However I don't wish to export the data that has been eliminated from display with the portal filter. At the moment I'm getting all rows in the export, including the ones where field x = 'Cancelled'.

The portal filter does just that: it filters the records displayed in the portal. It does not filter the records found through the relationship (as you have discovered).

Best bet is to use the GTRR step to select the related records, then loop through them and omit all those records that are cancelled. Export the remaining records.

  • 2 years later...

Best bet is to use the GTRR step to select the related records, then loop through them and omit all those records that are cancelled. Export the remaining records.

 

I know this is a bit old, but it could save others some time  :yep:

The OP said his portal records were already filtered to omit records, so you wouldn't need to "loop through to omit them"  :idot:

What LaRetta said above is absolutely correct  :)

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.