1 Reply Latest reply on Nov 18, 2016 9:27 AM by Larry Newdorf

    Wildcard Filtering with Javascript

    Larry Newdorf

      I am trying to do a wildcard text match on a filter using the javascript API.  The Tableau Javascript API only appears to be able to do case sensitive matching however.  The code I am using for matching is:  applyFilterAsync(filterName, value, ‘REPLACE’);

       

      I was hoping that creating the Filter within the Tableau Viz, setting it to "Wildcard Match", and then hiding the filter would do the trick, but unfortunately not.

       

      Unfortunately it doesn’t look like I can modify the value to use wildcard characters (% *) , before or after the user input, to achieve the result set that I am looking for.

       

      We just updated to v10.1

       

      Thank you for any advice!

       

      Larry

        • 1. Re: Wildcard Filtering with Javascript
          Larry Newdorf

          I was able to come up with a solution by creating a parameter which the filter condition uses.

           

          If the text field is updated on the form I

           

          1,  refresh my page adding that search param to the url.

          2,  before I init the viz, I check to see if that parameter exists.

          3,  if it exists I add it to the url that I use in my Viz creation call

          4,  create the Viz object which will initialize with the filtered text values displayed

           

          Larry