5 Replies Latest reply on Apr 28, 2017 7:57 AM by Carlos Velasco

    Tabcmd vs Ampersand in filter value

    Carlos Velasco

      SUMMARY

      Issue: Tabcmd decodes "%26" to "&" and results in a blank dashboard image.

       

      DETAILS

      Server/Desktop v9.3.6 and Tabcmd v9300.16.0315.0934.  I'm using Tabcmd with filters and 'getting' the image of a dashboard from Tableau Server.  Some of the filter values have special character " & ".  I encode this to %20%5C%26%20 before feeding to Tabcmd. But when Tabcmd requests the resource, it says "Requesting '...%20%5c&%20...'" which returns a blank dashboard.  I've also tried other solutions: without leading %5C i.e. only %26, with leading % or %25, with leading ^ or %5E, double quotes, and others that Users have posted.  I'm typing everything into the command line.  I do the tabcmd login first and then get image.  Note: I have no issues using %5c%26 and %26 in a web browser url to get the image.

       

      REFERENCES:

      http://kb.tableau.com/articles/howto/automating-pdf-exports-with-filters-using-tabcmd
      http://kb.tableau.com/articles/issue/special-characters-in-url-parameters

       

      EXAMPLE:

       

      Data:
      Abc       Def
      1            22 & 44
      2            55 & 99
      3            55 & 99
      4            55 & 99

       

      Workbook :           WB       ExportWithFilters
      View:                    VW       PlusFilterAmpersand
      Output Filepath:   OF        e.g. C:\temp\report.png


      Command:
      > tabcmd get "/views/WB/VW.png?Abc=1,3,4" -f "OF"                                                     (dashboard png displays the filtered dashboard; just a test)
      > tabcmd get "/views/WB/VW.png?Abc=1,3,4&Def=55%20%5C%26%2099" -f "OF"      (dashboard png exists but no data)
      > tabcmd get "/views/WB/VW.png?Abc=1,3,4&Def=55%20%26%2099" -f "OF"              (dashboard png exists but no data)