The lifespan is for the duration of the solution being open after being applied.
It was created with in mind the senario for example, where the sales department never should see purchase info.
This would mean that I could change the contents of the ‘globals.filterKey’ field at any time and then reapply the filter to change the foundset !?
Or does it work that once set with a value then it does persist until the solution is closed and reopened - even if you performed another method which changed the filter to the ‘Support’ department ?
Is it possible to use addfilterparam to filter based on multiple unrelated values (id = 1 or id = 4 or id = 695, etc.)? Put another way, can you do either an ‘and’ or an ‘or’ with addfilterparam?
Currently the addFoundSetFilterParam is an “AND” only - the “OR” operator is not supported. The main reason is it’s hard to specify the cardinality (where the parenthesis goes). That’s because you might want something like this:
AND (a=1 or a =2 or a=3 OR (b=12 AND c= 9 OR (d=3 AND f=12)))
Once the “OR” is breached, it opens a whole new “can of worms.”
Personally, I would LOVE to have the “OR” capabilities as well. Here’s one thing that I do that helps in my solutions:
Make a global subroutine that will add all the other fields to your search, then just call that subroutine before you perform your finds. I also have subroutines for my SQL queries as well - so I can apply them as needed in my custom SQL queries.