5 Replies Latest reply: Jan 4, 2013 9:13 AM by Syed Khaled Shahbaaz RSS

    OnOpen Triggers

    Gerhard Laubscher

      Hi there,

       

      I have a two-fold question regarding document triggers. Some background:

       

      I have a qvw that I upload to an FTP site daily, from where our clients collect and deploy it on their server. I am now busy automating this process. As part of this automation I have OnOpen Triggers, which sets of a series of events, including reload, macros to create excel reports, saving the document and uploading to the FTP site.

       

       

      1. Is there any way to do a "conditional trigger"? These triggers work great, but now, whenever I want to open this document to edit it or work from it, it obviously triggers all these actions, even though everything already happened at 7AM the morning. At 7AM the file is opened via Task Scheduler - I want the triggers to work then, but not when I manually open the file? Maybe look at last reload date somehow?

       

      2. I have no QlikView Server experience - only our clients use it, and they haven't yet used my new "automated" file. Am I correct that these OnOpen triggers will not have any impact their side? When they open the file I don't want anything to happen.

       

       

      Sorry for the long post.

       

      Gerhard

        • Re: OnOpen Triggers
          Gerhard Laubscher

          Okay I figured out Question number 1 myself, but would still like confirmation on question 2 please.

           

          Thanks,

           

          G

            • Re: OnOpen Triggers

              Hi,

               

              Regarding your second concern, since the triggers are applied on the document level, it is highly likely that your triggers will be executed as defined upon document open.

               

              Since you are using the document on QlikView desktop, and do not want the triggers to be executed on users accessing the document via server, you can use something like =if(ClientPlatform()='Browser.Firefox' as the logic to run triggers.

               

              I am assuming it might help.

               

              Regards,

               

              -Khaled.

                • Re: OnOpen Triggers
                  Gerhard Laubscher

                  Hi Khaled,

                   

                  Okay, so for my first problem I changed all my triggers to run from Macros (as opposed to normal trigger actions like Reload Doc).

                   

                  Then I did this, to only run the triggers if the file is NOT up to date. I did this for 6 separate macros:

                   

                  if(max({1}[Account open date])<>today()-1,'ReloadDoc')

                   

                  Now I want the triggers to run only if that condition is not met, AND if the client is not accessing it via server.

                   

                  So would this syntax work (this is something I cannot test myself and don't want to bother the clients with):

                   

                  if((max({1}[Account open date])<>today()-1) AND ClientPlatform()<>'Browser.Firefox),'ReloadDoc')

                   

                  I'm also not sure who uses what browser. I guess I can't do something like:

                  if((max({1}[Account open date])<>today()-1) AND ClientPlatform()<>'Browser.*),'ReloadDoc')

                   

                   

                  According to the reference manual "OnOpen event will not function when running in the Ajax Client." - but I have ZERO idea about what our clients use, and would love to not have to show my ignorance to them (I don't even know what the Ajax Client is or how it differs from them accessing via web - time to Google I guess).