Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Reply
Anonymous
Not applicable
Author

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.