8 Replies Latest reply on Jan 17, 2017 12:40 AM by Jonathan Wattiaux

    Undo Redo Javascript API

    Arjun R



      As part of a feature spike, we observed that Tableau application as such has a toolbar with undo,redo and revert actions. However Tableau doesn't  have a JavaScript API for *undo* and *redo* action.


      Are there any plans to expose the above mentioned APIs in any new release? If not, how can we emulate the toolbar undo and redo actions with toolbar disabled?


      Thanks in Advance,


        • 1. Re: Undo Redo Javascript API
          Patrick Van Der Hyde



          I am asking around about this but from some quick reading - CSS magic tricks with Embedded Tableau Server views | Tableau and Behold!   I do not believe there is a js api method for these calls.



          • 2. Re: Undo Redo Javascript API
            Russell Christopher

            Hi Arjun -


            As far as I know, "no". Can you give us an idea of how you would actually use this in the "real world'? How would this be useful?

            • 3. Re: Undo Redo Javascript API
              Arjun R

              Hi Russell,


              The example is fairly simple:


              • Let’s say I was on a filtered analysis and I changed a filter unconsciously e.g. from customer “blabla” to customer “hey ho”, then I want to come back to customer “blabla” but for some reason I forgot his name. An easy way to come back to a previous situation without having to do it manually is to use the “undo” feature.
              • Let’s say I want to quickly switch between two filters e.g. from customer “blabla” to customer “hey ho” without having to manually do that operation (because there are 1000 customers). Then a quick way to switch back and forth is to use undo / redo

              Irrespective of example, the undo/redo operation is allowed in Tableau toolbar. Its just that the API is not exposed. It would be great if they do that.

              • 4. Re: Undo Redo Javascript API
                Russell Christopher



                Still trying to understand...


                On #1, wouldn't you just use the UI to undo your change if you made the mistake using the UI in the first place? How does JavaScript help you here?


                On #2, wouldn't you just record the fact that the customer was "blabla" in a variable? I guess you could argue "undo" would be less coding on your part...

                • 5. Re: Undo Redo Javascript API
                  Jonathan Wattiaux

                  Hi Russell,


                  I am working with Arjun, so I can give some more information.


                  In our Tableau integration, we do not show the Tableau toolbar to our user.

                  Why? Because its design is not aligned with the toolbar design.


                  So we created our own toolbar, and we recreated the actions of the Tableau toolbar by using the JS api (which allows for everything except undo / redo, strangely).


                  One more scenario where not having access to the "redo" action is blocking us:

                  Step 1 - In a scatter chart, the user selects some dots, then clicks on "keep only"

                  Step 2 - Then he selects some dots in that first subset, then clicks on "keep only"

                  Step 3 - The user wants to come back to the state he reached at the end of step 1


                  Without an "undo" button, performing step 3 will just be a pain...


                  Is our challenge any clearer?

                  • 6. Re: Undo Redo Javascript API
                    Russell Christopher

                    Good stuff!


                    I'll pass this along to the PM who owns this stuff.

                    • 7. Re: Undo Redo Javascript API
                      Justin Rockwood

                      Thanks for your question. Currently, the undo and redo functions are not exposed through the API, but it's something that we are actively working on. In the meantime, you'll have to manually track the actions that the user did and implement your own version of undo/redo. It's not an easy task, though, so it's not that great of a workaround. Sorry!

                      1 of 1 people found this helpful
                      • 8. Re: Undo Redo Javascript API
                        Jonathan Wattiaux

                        Thanks Justin and Russell for the quick answers! We will then wait for the feature to be exposed via the JS API.