Not exactly sure of the question - but you can use query.extension and build you a filter on a session. You can search on query.extension to get an idea of the possibilities.
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.
systems provided free by Baan Board
Play the Google game and help Baanboard get better rankings. Do your part. Click here
to find how.