1 Reply Latest reply on Sep 28, 2015 9:36 AM by diego.medrano

    getFieldName doesn't return a valid filter name

    Alex Martens

      I am working with a report that includes a dropdown filter with the label of 'Country' where you choose a country to filter by i.e. India, Brazil, etc. I get this filter by calling getFiltersAsync and iterating over the results.


      The problem that I am having is, when I call getFieldName, I get some long string "Action (Country,Sls Org Sk)”, which, when I pass it (along with a value) to a new instance of the tableau object as a filter option, I get an error. This string is NOT the "the caption as shown in the UI" as the documentation states! I don't have any problem using the caption Country to set the filter value, but, in this case, I need to query the worksheet and pass off any filters that get returned to a new instance of the tableau object.


      I even tried passing it in after render with applyFilterAsync i.e. Worksheet.applyFilterAsync("Action (Country,Sls Org Sk)”, "India", tableauSoftware.FilterUpdateType.REPLACE) but no luck.


      Is this a problem with the report? Is there a generalized solution to this problem? I know that I will run into this same problem with other filters too. HELP!