Saving state of Dynamic Content Filter on page reload

Brad Zebell
Tera Expert

I created a Dynamic Content Filter for a dashboard, the filter works great but I need a way to save the applied filter when the user navigates away from the dashboard and then comes back.  Currently every refresh of the dashboard resets the filter.  Is there as setting on the DashboardMessageHandler or SNC.canvas.interactiveFilters that can save the filter?  Or is there a way to save the filter settings to the session and then pull those settings when the page reloads?

 

1 ACCEPTED SOLUTION

Brad Zebell
Tera Expert

I solved the problem.  I used GlideAjax to send the filter state to a Script Include.  The Script Include then saves that data to the Session with gs.getSession().putClientData  .   Then on page load event I use ajax again to call the Script Include which uses gs.getSession().getClientData to send the filter state back to the loading page.  Then just reapply the variables and publish the filter.  Only issue i have is the ~1 second delay for the page fields to update and apply.

 

View solution in original post

1 REPLY 1

Brad Zebell
Tera Expert

I solved the problem.  I used GlideAjax to send the filter state to a Script Include.  The Script Include then saves that data to the Session with gs.getSession().putClientData  .   Then on page load event I use ajax again to call the Script Include which uses gs.getSession().getClientData to send the filter state back to the loading page.  Then just reapply the variables and publish the filter.  Only issue i have is the ~1 second delay for the page fields to update and apply.