1 Reply Latest reply on May 1, 2014 5:34 PM by Justin Rockwood

    Passing Custom Options via Tableau JS API  Viz

    Souma Deep

      Present Scenario: We have tried to call a Tableau dashboard with all the below mentioned parameters provided in 'options' & that has worked well. This works maybe because the parameters passed are available in the list of parameters that can be called in Tableau. A reference of the available parameters which can be used are provided in the documentation reference: http://onlinehelp.tableausoftware.com/v7.0/server/en-us/embed_list.htm.

      I have used this v7.0 in the v8.0 JS call & that has worked well.

       

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

      var url = "http://tabserver/views/workbookname/viewname";

      var options =

      {    hideTabs: true,

         width: "800px",

         height: "700px",

         ticket: "Etdpsm_Ew6rJY-9kRrALjauU",

         toolbar: "yes",

         embed: "yes",

      };

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

       

      Question: The question is what if we want to pass a custom parameter in the 'options' tab. For eg: 'License_key'. Below is the kind of call I am looking forward to do. 

       

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

      var url = "http://tabserver/views/workbookname/viewname";

      var options =

      hideTabs: true, 

      width: "800px",

         height: "700px", 

      ticket: "Etdpsm_Ew6rJY-9kRrALjauU", 

      license_key: "69",

         toolbar: "yes",

         embed: "yes",

      };

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

       

      Now license_key is a custom parameter which my tableau accepts in the normal way. Can i use tableau JS & call it in the following way via options?