Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Community Office Hours: Join us on July 9th, 2025 - REGISTER HERE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Eric_Tay
Employee
Employee

Qlik Sense Workbench - Get Current Selection

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>');
           

        }

    };

} );


0 Replies