Hi,
I just started playing arround with the javascript API, and I'm running into a couple of problems when interacting with action filters on a dashboard. My dashboard (MyDash) has two sheets (Sheet1 and Sheet2), and I've defined a filter action that activates when selecting the first sheet that filters the second. This action works on only one field, and the set associated with is named ActionFilterSet.
My first experiment was to try and clear the action filter. So I used code that looks something like:
myDashboard.getWorksheets().get('Sheet1').clearFilterAsync('ActionFilterSet');
In this line myDashboard represents a variable that points to the dashboard sheet. This code clears the filter for Sheet1, but Sheet2 stays as it was, generating an incosistent state. Is this a bug, or is it the expected behavior? Is there any way to have the same behavior as a user would have when setting the filter to (all)?
The second problem I run into was when trying to set the filter to a specific value. Here's my code:
myDashboard.getWorksheets().get('Sheet1').applyFilterAsync(
'ActionFilterSet',
'SomeValue',
tableau.FilterUpdateType.REPLACE);
If I run this code I get an exception of type invalidFilterFieldName. Any thoughts on why this is happening? IsapplyFilterAsync not valid for sets/action filters?
Regards
Carlos Jourdan
Hey Carlos,
Have you made any progress on this? If so, please feel free to share what you've found. Otherwise, let us know if you could still use help!
-Diego
Become a Viz Whiz on the Forums! Support the Community and master Tableau.