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.

Turn 'OFF' portal filtering in script?

Featured Replies

I am using FM 12 advanced.

I put a button on my portal that opens a layout that allows the user to specify a Start Date and an End Date. These two values are collected as gStartDate and gEndDate (global).

Then in the portal I specify that Dues::Date >= gStartDate and Dues::Date <= gEndDate.

This works.

But, there doesn't seem to be a way to 'unfilter' the portal via a script? ?????

I tried changing gStartDate and gEndDate to "" but that just shows nothing in the portal.

I tried putting '01/01/1900' as gStartDate and ''12/31/2050' in gEndDate and this works. But, I have a merge field that shows the filter dates on the portal and it looks 'goofy' to see a date range of Jan 01 1900 - Dec 31 2050.

post-72145-0-33390900-1336202861_thumb.j

Thanks

The problem is the logic you are using, not that portal filtering cannot be changed by a script.

The filter expression needs to consider the condition that the start and end dates can be empty.

Let(

[

startdate = case( isempty( gStartDate ) ; Date( 1 ; 1 ; 1 ) ; gStartDate ) ;

enddate = case( isempty( gEndDate ) ; Date( 12 ; 31 ; 4000 ) ; gEndDate )

] ;

Dues::Date >= startdate and Dues::Date <= enddate

)

  • Author

Perfect. Thanks.

What I was 'awkwardly' asking was "Is there an effective way, by script step, to check/uncheck or turn on/off portal filtering?" For example, a get(PortalFilterState) that could be toggled on/off. I coiuldn't find it. Maybe in Fm 13... ha

ron

You aren't "turning off" portal filtering, you are changing that records the portal allows to be visible.

If you want to show all portal records then change the filter expression to 1. There is no need for a new function.

I am noticing a trend of people requesting functions to do things that can already be done, or don't need doing.

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.