Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4584 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

)

Posted

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

Posted

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.

This topic is 4584 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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