3 Replies Latest reply: Aug 16, 2012 5:22 AM by At titude RSS

    Call SQL or LOAD on button click



      I have two calendar controls where users can select the date range. I need to create a button which when clicked will trigger a SQL/Load statement in QlikView everytime. Also, I need to pass the dates selected by the user on button click to the sql/load statement. Any help would really be appreciated.


      Sample Load:

      Load *

      from file.qvd

      where date >= $(vStartDate) and date <= $(vEndDate)




        • Re: Call SQL or LOAD on button click
          Jason Michaelides

          It is not possible for users to directly trigger a reload. You may be able to achieve it by writing to a file that triggers an EDX-load. Search on this forum for other posts asking the same thing.


          Hope this helps,



          • Re: Call SQL or LOAD on button click
            David Ambrozie


                 See the example attached. You can create a file in the same manner but it will work only locally.

                 Jason is right, the users won't be able to perform the reload from the server.




            • Re: Call SQL or LOAD on button click

              While reloading the data if you want users to pass the dates then in that case you can use the following!


              Input( str cue [, str caption] )
              This function can be used in the script only and opens an input box
              that prompts the user for a value during the script execution. The
              parameters cue and caption are used as message and caption texts,
              respectively. The function returns the entered value.
              The input box function returns NULL if the dialog is cancelled,
              closed or cannot be shown.
              Input('Enter value', 'Input box') as v,
              Recno () as r
              autogenerate 3;