0 Replies Latest reply: Jun 17, 2015 10:51 AM by Eric Tay RSS

    Qlik Sense Workbench - Get Current Selection

    Eric Tay

      Dear Qlik Sense Gurus,

       

      I am a Qlik Sense and Java Script newbie.  I want to create a button using Qlik Sense Desktop Workbench, to redirect users to a PHP website and pass the current selection values to the PHP website.

       

      Below is the code I have written inside the .js file.  I can show the button, but I didn't manage to get the current selected values under Year field.  Appreciate if you can teach me the code to get the current selection.

       

      Furthermore, is there any website to learn more about the Java Script libraries / functions that I can use in Qlik Sense Desktop Workbench?

       

      define( [

      ],

      function ( ) {   

       

          return {

                paint: function ($element) {


      $element.html('<form action="http://localhost/b.php"><input name="Year" value="=getcurrentselection(Year)" type="hidden"><button type="submit">Go to PHP website</button></form>');
                 

              }

          };

       

      } );