I have a set of filters on a grid and one of those filters can be hidden, or not, as required. When the filter field is hidden it seems to still affect the filter behavior. Scenario: When the filter is displayed and the user selects a value for the filter (this is a dropdown), the filter works fine. When the filter is hidden the value that was in the filter still seems to persist even though the filter is not being displayed. I have tried doing a reset to the filter, conditioned on the same app variable that hides the filter, but this caused the app to go into a loop where the page was constantly being rendered alternately displaying the grid and filters with, and then without, the filter in question. Do I need to progammatically clear the filter when the filter is not being displayed?
Announcement
Collapse
No announcement yet.
Hiding a filter but the filter value still persists
Collapse
X
-
I found that I was able to use the Set Filter app variable link for the filter in question. When I hide the filter I also set the value of the filter to " ". The only minor issue is that the page gets rendered twice in succession - once when I set the app variable to hide the filter and again when I set the app variable to set the filter field value. I execute both of these setappvar()s in the filter program, one statement right after the other. I have tried switching the order of the setappvar() statements and it doesn't appear to make a difference which is executed first. But for the most part this is now working. Thanks again.
Comment
Comment