Reset all filters using javascript is still remembering the filters after user login back

  • 1
  • Problem
  • Updated 2 months ago
  • Solved
I have created a global Reset Action which deactivate the all model conditions and clear the search box using JavaScript Snippet. It works fine if the user is in the session.

But when user logs out from the portal and log in back it remembers the last applied filters which was already reset using the Reset Action.

I guess the Reset Action is only deactivating the condition it is not toggling the values to the cache to forget the details of removed filters.

Please suggest me what to do in this scenario.
Photo of Prateek Kumar

Prateek Kumar

  • 176 Points 100 badge 2x thumb
  • sad

Posted 2 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 3,992 Points 3k badge 2x thumb
My first thought is to set the filters to not remember the last value. This is a filter setting in the page composer.

The second thought is a question or two: What is the page setting for Personalization Mode? And, in your deactivateCondition() functions do you include TRUE for the optional argument affectPersonalization?





deactivateCondition(conditionaffectPersonalization)

Deactivates the given skuid.model.Condition() so that it will not be applied to future queries on this model.

Arguments:

  • condition (skuid.model.Condition) – The condition to deactivate
  • affectPersonalization (boolean) – Optional. If true, and if the condition has a name, then the Skuid Personalization Framework will store the value of this condition indefinitely (if the Page’s Personalization Mode is set to Server-side) or for the duration of the browser session (if the Page’s Personalization Mode is Client-side) so that the condition’s current value will be pulled from the stored value for the running user the next time that the page is loaded.

Photo of Prateek Kumar

Prateek Kumar

  • 176 Points 100 badge 2x thumb
Thanks! Mike Dwyer
It was really very helpful information.