Daniel Shanahan Posted December 24, 2010 Posted December 24, 2010 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.
comment Posted December 25, 2010 Posted December 25, 2010 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] )
Daniel Shanahan Posted December 25, 2010 Author Posted December 25, 2010 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.
comment Posted December 25, 2010 Posted December 25, 2010 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.
Recommended Posts
This topic is 5081 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 accountSign in
Already have an account? Sign in here.
Sign In Now