4 Replies Latest reply on Mar 6, 2016 11:17 PM by Jeff Franco

    Using JavaScript API to update a Parameter?

    Paul Madani

      We have a dashboard where we use a parameter to filter dates for multiple datasoucres.

       

      Unfortunately parameters cannot be updated using a refresh schedule so any new dates that are added to the database cannot be accessed without manually adding them to the parameter and republishing.

       

      I thought there may be 2 possible solutions using the JavaScript API:

      1. Dynamically set the maximum date of the parameter. Unfortunately I cannot see where this variable is exposed in the API. It looks as though you can only update the current value of a parameter and that's it. This would be the preferred solution.
      2. Use a date filter to update the parameter on filter change. My plan was basically to catch filter change events and then pass the new value (Single Value (Slider)) to the parameter. However, I have been unable to read the specific filter value using getFiltersAsync(). To be honest it doesn't seem clear to me at all how it works or how I can see the actual results.

       

      Has anyone had any luck with this or have any ideas?

       

      Again I pretty much have to use a parameter here.