3 Replies Latest reply: Aug 14, 2012 2:05 AM by kiks51 RSS

    Create temporary table after selection

      Hello,

       

      when I clik on a button, I'd like to create a temporary table in the database of my Qlikview document . I don't know how to do that and I don't find documentation on this subject. VB script ?

       

      To make it clear,I'd like the user do his selection (counrty, product...etc)

      then he click on a button

      and with his selection we create a new table in the database. This table can't be create before the selection is done.

       

      I don't know if this kind of program are possible in Qlikview !

       

      Thank you

        • Re: Create temporary table after selection
          Deepak Vadithala

          Hi,

           

          QlikView is designed for Read-Only purposes. Although, we have two options

           

          1. Edit Script > Settings > Check open databases in read & write mode

          2. VB Script

           

          we can use VB Script within QlikView API model. You can write VB Script(Macro) and call it on On-Click action. QlikView provides in-built triggers and you can use these triggers to call the Macro code. I'm attaching the API reference documentation for your understanding.

           

          I wanted to understand why do you want to give the power to users to create a new table on button click? I'm assuming that you understand the implication of this request...this will be very DANGEROUS where users end up creating 100's of table (If not crashing the DB) and there is potential risk on the data integrity or your DBA might not appreciate this approach.

           

          If you really wanted to write to a table then I'd recommend you to store the data in the flat file/CSV format and run the batch process without giving direct access to the users. This way you don't have to provide "Write Permissions" to every user, rather you have one login which does the job.

           

          I hope it makes sense!

           

          Cheers,

          DV

           

          www.QlikShare.com

            • Re: Create temporary table after selection

              Thank you for your answer,

               

              I try to be more precise!

              Today I have this result

               

              exemple.jpg

               

              What I want, it's to "concatenate" these three tables in one. The link is the year/quarter dimension.

              The expression are not based on the same selection. The user make selection on 20 dimensions

              First Table : SUM(PDTTOT) to calculate this expression the user click on a button which make the link between 5 dimensions

              Second table : SUM( {$<DTFB= >} NART) 19 dimensions (except DTFB)

              Third table : Cumulative SUM (depends dimension age(0 to 10))

               

              What I wanted to do it's to create a table like that :

              PER      AGE     VALUE

              2002/1   0              0

              2002/1   1              1

              ...

              2002/1   -1             68

              2002/1   -2           409592

               

              I've no idea on how to do that and if it is possible.

              I hope I'm more clear on my demand