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.

Filtering portal results

Featured Replies

I have a portal in a layout. The layout only has one record and I related the table to a global field in the table for the portal so it currently shows all records in that table. What I want it to do is when the layout is opened it will filter the portal's records to be only when the staff field is the same as the logged in account (using a get function). Is there a way to filter the portal records like this or should I give up and put this data in a separate window.

Beyond not necessarily having to be in a global, could you in the initial script set the key value to the desired value as a condition.

http://www.filemaker.com/help/FunctionsRef-250.html

--sd

  • Author

I see where you are coming from, I hadn't thought about that. The only problem is this database is being accessed by multiple users via Filemaker server.

Why don't you define an unstored calculation field =

Get (AccountName)

then define the relationship as matching this field to the Staff field in the related table.

The same could be achieved by using a global field instead of the calculation field, and having a startup script set the global to Get (AccountName) - I believe that's what Søren meant.

Ok! thats right it then needs to be a global field out of reach for the user, which get set by the init script, unless you change the relation to have the userprivileges as a unstored field on primary side, following the rendering ... and hardwired on the foreignkey side.

--sd

  • Author

Thank you both, I seem to have it working. I need to test it in a multi user environment but it all looks promising. Thank you again.

  • Author

Tried it on a network and it works. The next problem I have is I would like this portal to also filter on one other field. The records in a portal are ToDo items and when they are done a date filed is filled in to show they have been completed. It would be great to only show the items not completed (ie items in which the date_done field is blank) I have ordered the records so that the blank ones appear at the top and I can conditional format them to make them clear, but it would be nice just to have only the relevant records. Is there a way to do it?

You could define a calculation field in in the ToDo table =

Case ( not DateCompleted ; Staff )

and use this field for the relationship instead of the Staff field.

  • Author

Brilliant thank you, works like a dream

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.