2 Replies Latest reply on Oct 5, 2017 10:57 AM by Hugh Nguyen

    lifecycle of a parameter

    Pawn Tan

      Can somebody point me to a documentation that describe the lifecyle of a parameter when using trusted authentication from javascript? questions I have in minds are:

      1. If I type a value of 4 for parameter a. , does parameter a stay with the value of 4 as long as I don't request a new ticket ?

      2. How long does a ticket obtained using  trusted authentication last ? I notice that once I succesfully pull a view URL with a ticket, the next API can pull a simplified view without ticket  appended in the URL anymore. But how long I can use the simplified ticket ? I assume at some point tableau require a new ticket to requested.

       

      3. Once I obtain a new ticket, does the parameter a  still carry a value of 4 ?

      4. If my javascript application request a ticket with different user, was the prior value of 4 for parameter a, entered by different user, seen  by this different user ?

       

       

      How do I persist the parameter value so that if I login with the same user, I can see my prior parameter entry ?

       

       

      This question is for using table server on my own server. Not public tableau.

        • 1. Re: lifecycle of a parameter
          Patrick A Van Der Hyde

          Hello Pawn,

           

          I just moved this thread to the JavaScript API area where you will find documentation and help with Javascript questions.   You also may want to review - https://www.interworks.com/blog/daustin/2015/12/17/dynamic-parameters-tableau   where a lot of work with parameters in javascript is discussed and examples are shown.

           

          I hope this helps.

           

          Patrick 

          • 2. Re: lifecycle of a parameter
            Hugh Nguyen

            AFAIK:

            1. The parameter value should remain the same for the session until of course the value is programmatically or manually changed. Once a new session is requested, the worksheet will load with the default value of the parameter. In this case, it may be null or whatever it was set to during the workbook authoring phase.

             

            2. The ticket essentially redeems a session (by default this sessions is restricted to views/dashboards only) and this session has the same timeout restrictions. There are two timeout settings that will likely impact this, wgserver.session.idle_limit and vizqlserver.session.expiry.timeout. See here tabadmin set options

             

            3. Not sure about this, but my guess is once you redeem a view with the ticket, a new session is created and the previous sessions becomes invalid. So in this case, the parameter value will be set to the default value of the workbook until it gets set again. Similar to number 1 above.

             

            4. Yeah same as above. New sessions will cause the worksheet to load the default values.

             

            To persist the parameter value, you can use getParameterAsync and issue a changeParameterAsync to set them (see here API Reference ). Additionally, you can also set it as a url/object parameter filter (see here Parameters for Embed Code).

            1 of 1 people found this helpful