4 Replies Latest reply on Mar 21, 2017 3:49 PM by Ryan Gensel

    Can I apply a Parameter value before visualization has been loaded or is "options" limited to Filters?

    Ryan Gensel

      The JS API documentation provides for passing a filter value prior to the visualization's first load. However, I've read other online resources that have mentioned passing parameters in the same way. Does anyone have a confirmation yes or no? If no, is there another way to programmatically pass in parameter values prior to load, or to accomplish what I'm trying to achieve via other methods?

       

      function initializeViz() {

        var placeholderDiv = document.getElementById("tableauViz");

        var url = "http://myurl.com...";

        var options = {

          hideTabs: false,

          hideToolbar: true,

      //    FilterName: value,

      //    ParameterName: value,

          onFirstInteractive: function () {

            workbook = viz.getWorkbook();

            activeSheet = workbook.getActiveSheet();

          }

        };

        viz = new tableauSoftware.Viz(placeholderDiv, url, options);

      }

       

      Background on issue:

      I have a StartDate and EndDate parameter, which control a "Dates in Range" boolean filter across my views. I want to dynamically load a StartDate from JS on initial load.