6 Replies Latest reply on Feb 13, 2012 8:21 AM by t.t

    Add button to worksheet

      I started trying out Tableau recently and was wondering if there is a way to add a clickable button to a worksheet. I managed to fudge it with a selectable string list and an if statement, but the process that gets triggered (via a raw sql query) might be called if the worksheet gets refreshed. The process is actually calling a recalculation on some values in my database, so I can't have it happening accidentally. Is there anything I can do?

        • 1. Re: Add button to worksheet
          Alex Kerin

          Can you trigger via a webpage (on an intranet probably)?

          • 2. Re: Add button to worksheet
            Russell Christopher

            One option is to create worksheet that "looks" like a button. Then, put a Filter Action behind the worksheet. When someone clicks your "button sheet", your filter action is activated.

            • 3. Re: Add button to worksheet
              Shawn Wallwork

              Russell, I'm interested in trying out your solution. I understand the filter part. And that images can be used in a dashboard to create a button "look", though evidently images can't trigger an action (just a URL call), which would be nice solution. So how are you thinking of creating the button "look" on a worksheet? Custom shapes?

               

              --Shawn

              • 4. Re: Add button to worksheet
                Russell Christopher

                Hey Shawn -

                 

                Yeah, you have to click on data for the actions to fire.

                 

                You could approach this by creating a calculated field which contains the "button text" and add that to the Rows shelf for the "sheet button" in question. Or, you could have a field in your data source with "button text" in it. 

                 

                Here's an example which uses two"buttons" -- Customer Name and Product. By selecting / de-selecting each one, we make a different worksheet appear in the dashboard. Not perfect by any stretch, but hopefully close enough to what you want.

                 

                Good luck!

                • 5. Re: Add button to worksheet
                  Shawn Wallwork

                  Russell, I see what you're doing, thanks. tt here's a variation on Russell's solution. It looks like this:

                   

                  Buttons.PNG

                  I just changed Russell's automatic to a custom shape and got rid of the pill on the text shelf. To get rid of all the gray lines you need to track down all of them (there are a lot) and change the color to white. The buttons were created at a free graphics site: http://www.clker.com/clipart-product-1.html The size of the button is a bit tricky. It's a re-size dance between the marks shelf size slider and the size of the table in the worksheet window. A snap-to layout grid would make this a lot easier.

                   

                  Now all we need is a way to animate the pressing of the button! (Jun you listening?)

                   

                  --Shawn

                   

                  Message was edited by: Shawn Wallwork

                  • 6. Re: Add button to worksheet

                    Thanks for the responses so far. I looked at the Actions available for a Dashboard and calling a URL does seem like the simplest solution. The buttons Russell and Shawn set up are what I'm looking for, but I don't have a webserver set up for my test. Are there any other options aside from calling out to a URL that could trigger something in my database? Ideally just using an SQL query, as I only have an SQL server up and running right now.