Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm beginner in qlik and I'm trying work with Qlick Sense 3.0 programmatically
I'm working with application described here
I can't programmatically get selections, please assist
This time, i want to set selections for field programmatically.
I can do it by next commands and it works:
app.field('Year').select([0], false, false);
app.field('Year').select([0, 1, 2], true, true);
app.field('Year').selectMatch('1997', true);
app.field('Year').selectAll();
But when I'm trying to select multiple values by value, nothing happening.
my code is:
app.field('Year').selectValues([{qText: '1997'}, {qText: '1998'}, {qText: '1999'}], true, true);
Example I took from this instructions:
PS
When I'm printing field values in console by next code:
$.each(app.field('Year').getData().rows, function(key, value) {
console.log(value.qText);
});
I'm receiving correct values:
Thanks
Please assist...
Hi,
My guess will be that those FieldValues have a Numeric representation, while you are sending only qText:
You should check if qNumeric === true and if so send instead qNumber && qNumeric.
Hi,
My guess will be that those FieldValues have a Numeric representation, while you are sending only qText:
You should check if qNumeric === true and if so send instead qNumber && qNumeric.
Thanks, Alham!
looks like for my purpose enough and it works:
app.field('Year').selectValues([1997, 1998, 1999, 2000], true, true);