When working with Tandem viewer then probably easiest approach would be to use views - views in Tandem can be saved and restored and include current state of filters etc. To get list of saved views use DtApp.views.fetchFacilityViews
. To restore saved view use DtApp.views.setCurrentView
- you can find example here.
The view creation is more complicated - there is DtApp.views.createView
but view payload isn't publicly documented. If you can provide more details I can look for more details.