Remember a User's choice when using Jquery effect in a snippet

Jeff RutterJeff Rutter Member
edited May 2018 in Questions
I have a feeling this might not be possible, but I thought I would ask anyways.... I built a tab page with an advanced search that is used to set condition values on the main table. I created a button that will show/hide the advanced search section by the click of a button. Using JQuery I can get this to work great. ---JavaScript Snippet on the button is... --- var params = arguments[0], $ = skuid.$; $('#advancedSearch').slideToggle("Slow"); My question is....Is it possible for Skuid to store the value for the running user if they like the search closed or open by default on the page? I couldn't find an answer to this, but wanted to see if anyone out there could confirm my thinking. Thanks! Jeff

Comments

  • Adam EdmondsAdam Edmonds Member
    edited April 2017
    One thought I've had in the past is to create a UserPreferencs object in Salesforce. Adding the new object as a model to the page would then allow you to store settings for use in rendering and preferences.
  • Amy DewaalAmy Dewaal Member, Skuad ✭✭
    edited May 2018
    Jeff,

    Adam's suggestion is probably your best option. That user choice is not something Skuid is able to remember, so the choice would need to be stored in an actual field in Salesforce somewhere

    Thanks!
  • Jeff RutterJeff Rutter Member
    edited April 2017
    Thanks Adam and Amy for your thoughts. Really appreciate it. I was wondering if storing the value somewhere would be necessary...I'll investigate that option. Thanks again, Jeff
  • Adam EdmondsAdam Edmonds Member
    edited April 2017
    The use of the dedicated object opens up a lot of possibles as far as letting your users tailor their own use and experience of the application. Plus it makes your life easier because you can then add the preference model to your master page (if applicable) and then use the preference model throughout.
  • Jeff RutterJeff Rutter Member
    edited April 2017
    That's a great idea! Thanks for sharing the tip! On a master page that would be amazingly useful too
Sign In or Register to comment.