6 Replies Latest reply on Jan 15, 2013 6:01 AM by Anya Fishchuk

    Is it possible to change quick filter content from  web application  by using embed parameters?

    Anya Fishchuk

      Hi!

       

      We would like to embed a view with quick filters into our web applicaiton and we would like to have possibility to filter the results , so that in some situations only a part of the result may be shown.

       

      1. When we use a view without quick filters, it is easy to filter results and to show only a subset without the possibility for a user to be able to see the whole set, for example, by using :

       

      <param name="filter" value="Source=DM_OSS,DM_SF_EC" />

       

      2. When we use a view with the quick filter visible, the whole range of sources is shown in this quick filter (see the first part of the image below).

      Is it possible to restrict quick filters as well, for example, to just two opportunities, by using embeded parameters or javascript while calling the view?

       

      Sources .jpg

      Thanks in advance!

       

      Anya

        • 1. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
          Joshua Milligan

          Anya,

           

          Yes, you can change filters in embedded views.  Check out the documentation for the syntax here:

           

          http://onlinehelp.tableausoftware.com/v7.0/server/en-us/embed.htm

           

          Quick filters have an option to "Show All Values in the Database", "Show Relevant Values Only", and (if you are using a context), "Show  Values in Context".  Using the little drop down arrow on the quick filter in Desktop, you can set the default and even customize whether or not someone viewing the viz in Server can change the option.

           

          If you select "Show Relevant Values Only", then any time another filter is applied, only options that are applicable will display.

           

          Joshua

          • 2. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
            Anya Fishchuk

            Dear Joshua,

            Thanks for your quick reply!

            Following your instructions (by selecting "Show Relevant Values Only", by deselecting "Show more/fewer button" and applying embed filter for the wanted dimention "Sources" values), I almost succeded to get the wanted quick filter layout in our web application (just two options visible in the view) immediatelly after initial page load :-) : filter1.jpg

             

            But, when I select one of the options in the quick filter on page, the layout of the quick filter is changed back to the "full version" :

            filter2.jpg

            It looks like the after this kind of postback  the original embed filter

            <param name="filter" value="Source=DM_OSS,DM_SF_EC" />

            is not used any more in the quick filter layout.

            Is it possible to keep the original quick filter layout (just two options visible) also after selecting one of the options?

             

            Another question is either it is posible to have the checkboxes in the quick filter selected in the initial load? My feeling is that it would correspond better with the results, shown in the view.

             

             

            Thanks!

             

            Best regards,

            Anya

             

            • 3. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
              Joshua Milligan

              Anya,

               

              What I suspect is happening is that you are using the same field to filter from the embed parameter and the quick filter.  So initially, the quick filter shows only relevant values for the filter passed in the embed parameter.  However, once it is changed, it is no longer constrained and thus shows all values (they are all now relevant).

               

              If you want to universally constrain the quick filter you'll need to use another field as a filter that cannot be changed by the user from the interface.  An easy test would be to duplicate the field you want to use as a filter (right click the field in desktop and select "Duplicate").  Rename it to something that will identify its use (e.g. Source_Embed_Filter).  Then when you embed the view from server, use the parameter to filter Source_Embed_Filter while still showing Source as the relevant values only quick filter.  The user won't be able to change what is filtered by Source_Embed_Filter and the Source quick filter will only ever show relevant values for what has been set for Source_Embed_Filter.

               

              Joshua

              • 4. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
                Anya Fishchuk

                Hi, Joshua,

                 

                Thanks for your reply.

                 

                Your suspicions are correct: I am using the same field to filter the quick filter and the view itself.

                 

                I am afraid that the proposed solution is not appropriate in our case: we do not want to restrict quick filter in tableau desktop, but during access from the web application itself.

                 

                Some users in our application should be able to see all Sources and to use quick filters to filter on all these sources, other users are allowed to see just a few sources  (and to use the quick filter to filter only these available for them  sources).

                 

                Actually what I would like is to publish the complete view, that includes all sources, and with quick filter, containing all sources.

                 

                And then, during embedding the view into our web application, restrict the view and the quick filters to the ones, that are allowed for the logged in user.

                For example:

                1.      User A is allowed to see all sources: so if this user is logged in, he would see the whole view and quick filters, containing all sources.

                2.      User B has access only to sources DM_OSS and DM_SF_EC. So, when this user is logged in, he would see filtered view (related to these sources) and the quick filter, containing only there two sources (so that the user B will not be able to get the forbidden sources by using the quick filter, but still would be able to make a sub-selection to see the results for just one source, for example).

                 

                 

                The user authorization (what sources a logged in user allowed to see) is already built in our application.

                 

                By using embed filter I can restrict access to the view .

                 

                Is it any possibility to restrict access to the quick filter values from the web application (by using embed parameters, javascript or what so ever) ?

                 

                Thank you!

                 

                Best regards,

                Anya

                • 5. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
                  Joshua Milligan

                  Anya,

                   

                  Okay, I see!  The great news is that Tableau has a way to do exactly what you want (and it's really easy!)

                   

                  What you'll want to do is create a user filter.  You can find out more here: http://onlinehelp.tableausoftware.com/current/pro/online/en-us/publish_userfilters.html

                   

                  The short of it is that you'll be able to assign users to the sources that they are able to see as part of the definition of the workbook.  You won't have to pass anything through embedding parameters (which aren't good for trying to enforce security -- I could intercept and change the parameter and see data I shouldn't).  But user filters are very secure.

                   

                  Also, from desktop, once you have defined the user filters, you can check to see what any given user will see on Server by changing the current user in the little drop down in the bottom status bar of your Tableau Desktop screen.

                   

                  user filter selectin.png

                   

                  Hope that helps!

                  1 of 1 people found this helpful
                  • 6. Re: Is it possible to change quick filter content from  web application  by using embed parameters?
                    Anya Fishchuk

                    Dear Joshua,

                    Thanks a lot for your responses!

                    After some discussions we decided to stick to your suggestion about duplicate dimensions when filtering views from the SQL database. It works perfect.

                     

                    When using cube (analysis services), it looks impossible to duplicate dimensions (is it correct?) . So your second solution will be helpful in this case. Although we have to synchronise somehow the users in tableau and in our web application.

                     

                    Thanks once more!

                    Anya.