Search code examples
custom-controlsselectionqliksense

Apply selection on Qlik Sense custom extension


I am new to Qlik Sense and I was having some problem when trying to apply selections with a custom Qlik Sense extension. I have tried from this tutorial. Unfortunately, I have no idea why there is nothing shown, not even error message.

I managed to console log out the things that I selected but Qlik Sense never applies the selections.


Solution

  • The easiest way to make a selection

    var app = qlik.currApp();
    app.field( "DimensionName" ).selectMatch("Value", false );
    

    You can use also selectValues for multiple values :

    Integers :
    app.field(fld).selectValues([5,10], true, true);
    
    Strings :
    app.field(fld).selectValues(["Andersson"], true, true);
    

    https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/APIs/Content/CapabilityAPIs/FieldAPI/selectValues-method.htm