Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

How to pass multiple parameters to selectValues in a Mashup

I've been trying to pass multiple selections of a numeric dimension into a mashup with no success. Several other threads have suggested answers which do not work for me.

The following example is given, where you pass "Array of qFieldValues to select":

app.field('LastName').selectValues([{qText: "Andersson"},{qText:"Bush"},{qText:"Obama"}], true, true);


This works for String dimension but not numeric.

I've tried with no success:

app.field('numericDim').selectValues([{qText: "1"},{qText:"2"},{qText:"3"}], true, true);

app.field('numericDim').selectValues([{qElemNumber: "1"},{qElemNumber:"2"},{qElemNumber:"3"}], true, true);

app.field('numericDim').selectValues([{qState: "1"},{qState:"2"},{qState:"3"}], true, true);

app.field('numericDim').selectValues([{qNum: "1"},{qNum:"2"},{qNum:"3"}], true, true);

app.field('numericDim').selectValues([{qNum: '1'},{qNum:'2'},{qNum:'3'}], true, true);

app.field('numericDim').selectValues([{qNum: 1},{qNum:2},{qNum:3}], true, true);


I've also tried loading the values into an array:

var selection = [];

selection.push(1);

selection.push(2);

selection.push(3);

app.field('numericDim').selectValues(selection, true, true);


Has anyone come across this who could offer some help?

Thanks.

Tags (2)
1 Reply
mrchmchr
New Contributor III

Re: How to pass multiple parameters to selectValues in a Mashup

Just passing an array of numerical values works for me.

That is

app.field('numericDim').selectValues([1,2,3], true, true);

Make sure the values are not formatted as strings.