Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone have experience using the selectMatch() function for selecting more than one value in a Qlik Sense mashup?
I want to select more that one year and I've tired these statements without any luck:
app.field("[Year]").selectMatch("20102011", false);
app.field("[Year]").selectMatch("2010 2011", false);
app.field("[Year]").selectMatch("2010|2011", false);
app.field("[Year]").selectMatch("2010,2011", false);
Thanks in advance.
/Thomas
SelectMatch performs a field search so normal search syntax in QS applies. In your case it would look like,
app.field("[Year]").selectMatch("2010 or 2011", false);
But I would recommend that you use app.field.selectValues instead which takes an array of either ElemNumbers or strings. In your case it would be something like,
app.field("[Year]").selectValues([{qText: '2010'}, {qText: '2011'}], true, true);
SelectMatch performs a field search so normal search syntax in QS applies. In your case it would look like,
app.field("[Year]").selectMatch("2010 or 2011", false);
But I would recommend that you use app.field.selectValues instead which takes an array of either ElemNumbers or strings. In your case it would be something like,
app.field("[Year]").selectValues([{qText: '2010'}, {qText: '2011'}], true, true);
ops the search syntax for selectMatch should probably be more closer to app.field("[Year]").selectMatch("=[Year] = '2010' OR [Year] = '2011'")
Thanks Alexander
I gave up on the SelectMatch and went with the SelectValues instead.
Best regards
Thomas
... or selectMatch(">=2010<=2011")
... or selectMatch('=MyVariable'), where MyVariable has the following definition: ='">=$(=date(vMyDate))"'
@Alexander_Thor , can you please help on this
https://community.qlik.com/t5/Integration-Extension-APIs/How-To-pass-values-in-field-based-on-condit...