2 Replies Latest reply: Apr 20, 2016 6:43 AM by Mario Di Loreto RSS

    Select rows and execute function calls

      Hello Experts,

      i need to execute in Qlikview one or more functions calls depending by rows selected.


      The qvw file contain 6 functions and sometimes i need to run 1 function , sometimes 2, 3 , etc..


      Actually i have a tab with calls list to comment or uncomment. It's very bad system i suppose.


      Example of script i use today:


      //call Option 1;

      call Option 2;

      //call Option 3;

      call Option 4;

      call Option 5;

      //call Option 6;



      This picture is an template i wish obtain.



      I hope this is possible in Qlikview.


      Many Thanks!



        • Re: Select rows and execute function calls
          Srikanth P

          You may try like below:


          Assume you added the Data Island table with Options. So you can select any option you want with LB object.


          Create a variable vGetOptionList = Concat(Options,'|');


          In the script, add IF cond for each Call


          IF Wildmatch('$(vGetOptionList)','*option1*) THEN

               Call FunctionOption1



          IF Wildmatch('$(vGetOptionList)','*option2*) THEN

               Call FunctionOption2



          IF Wildmatch('$(vGetOptionList)','*option3*) THEN

               Call FunctionOption3



          IF Wildmatch('$(vGetOptionList)','*option4*) THEN

               Call FunctionOption4



          IF Wildmatch('$(vGetOptionList)','*option5*) THEN

               Call FunctionOption4


            • Re: Select rows and execute function calls

              Hi dathu.qv i have tried but doesn't work.


              Snap 2016-04-20 at 12.17.10.png

              In START Button i have expression:


              IF Wildmatch('$(vGetOptionList)','AAA') THEN

                   call AAA;



              IF Wildmatch('$(vGetOptionList)','BBB') THEN

                   call BBB;



              IF Wildmatch('$(vGetOptionList)','CCC') THEN

                   call CCC;



              IF Wildmatch('$(vGetOptionList)','DDD') THEN

                   call DDD;





              In main script i have:


              vGetOptionList = Concat(Options,'|');



              LOAD * INLINE [

                 Funzione, posizione

                  AAA, 1

                  BBB, 2

                  CCC, 3

                  DDD, 4  



              In script tab "AAA" :

              Sub AAA

                Msgbox("You called AAA");

              end Sub


              When i select one or more test field (AAA, BBB ecc.) and press Start button dont happen nothing.