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.

Portal Filtering with Self-Join

Featured Replies

I'm having a little trouble with filtering a portal on a self-join. My relationship is a cartesian between VIEWER_vwr::ID and CalculationsFL::name (though, with a cartesian join, I'm not really sure it matters, as long as both fields are indexed) and my filter is as follows:

If ( not IsEmpty ( VIEWER_vwr::filter_g[2] ) ; PatternCount ( VIEWER_vwr::filter_g[2] ; CalculationsFL::name ) ; 1 )

The portal shows all the records, but as soon as I type something into the global filter, the portal displays nothing. The global filter on the layout, by the way, is the second repetition.

Any ideas what I am missing?

Thanks.

You didn't say what the purpose of the filtering is, but I am guessing you want something like:

IsEmpty ( VIEWER_vwr::filter_g[2] ) 

or

PatternCount ( CalculationsFL::name ; VIEWER_vwr::filter_g[2] )

  • Author

Thanks, comment.

I looked at it again with fresh eyes and came up with this:

Case ( not IsEmpty ( VIEWER_vwr::filter_g[2] ) ; If ( PatternCount ( CodeFL::name ; VIEWER_vwr::filter_g[2] ) > 0 ; 1 ; 0 ) ; 1 )

This works as expected.

You didn't say what the purpose of the filtering is

Selection of a portal record triggers a script that navigates to records within the same table.

Thanks again.

I meant what is the purpose of the filtering itself; all you gave us is a formula that doesn't work, with no hint of what counts as "working".

Anyway, I see the problem was - as I suspected - the order of parameters in the PatternCount() function. All those manipulations with 0 and 1 are redundant: any number other than zero returns True in a Boolean test.

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.