Keeping track of foundsets in 5.2

I’ve just started running into issues where setFoundSetFilterParam on one form affects the foundset when I navigate to another. I want to get in a good habit from the start, so I can keep track of filters I’ve set. The two methods I can see are…

  1. Always set namedFoundSet to “separate” when a form is going to use setFoundSetFilterParam. This seems to work, but it would be easy to forget.

  2. Apply filter in onShow event, giving it a name, and as soon as you write that code always use removeFoundSetFilterParam on the onHide event. This feels better practice to me (may as well use the new 5.2 functionality)

… comments on these two methods, and things my inexperienced self may have overlooked much appreciated.