3 Replies Latest reply on Jun 23, 2017 12:11 PM by Karthik Venkatachalam

    Accessing particular data through a link

    Matt Kerr

      Hello,

      So through the University I work for, we have both secure and public Tableau sites. We have a dashboard built that can be sliced and diced by county (counties in Pennsylvania). We have the dashboards published in the public Tableau site. However, we have a local app where representatives from each county will log into (security table in sql which binds the county ID to the login) to access the links to the dashboards. We cannot allow each county to see other county's data (other than their own). Does anyone know of a way to set it up so a person (county) can only see their own data? Each data set has a county id in the database as well. We tried embedding the county id into the link, but haven't had much success. Any insight would be great appreciated. Thanks

        • 1. Re: Accessing particular data through a link
          Karthik Venkatachalam

          Hi Matt,

          1) You could create a security table, with columns COUNTY_ID AND USER NAME. This table would always carry a user list and county they are mapped to. Likely a long and narrow table, but indexed and fast.

          2) Go to your workbook and do an inner join to this table, with COUNTY_ID field.

          3) Create a filter in the workbook which would always check for the logged in user and serve only that data.

           

          You can even skip the security table altogether if your USERNAME() or USERDOMAIN() fields in tableau, matches your Data field. In which case you would only do Step 3, and skip steps 1 and 2.

          • 2. Re: Accessing particular data through a link
            Matt Kerr

            Thanks Karthik,

            It looks like most of it is set up that way. Would you know how to pass the county ID from our app front end to the Tableau public server? This has been a show stopper for us. Any help is greatly appreciated!

            • 3. Re: Accessing particular data through a link
              Karthik Venkatachalam

              If you are embedding the tableau workbook, you can pass the filter through embed code. You could see the iframe tags in here. Parameters for Embed Code

              Even if its direct URL, you can just append the view with ?<Filter name>=<value>

              Only problem with this is they can try out different ID's and be able to get to other counties. But if you embed everything in an iframe, you are good. that way behind the screens  you could just pass county ID and display the iframe and user may not be able to tamper with the URL/filter values you passed.

              Just remember to create the county_id filter and add it to workbooks, and make it a context/apply to all datasources filter.