Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm new here and in Qliksense.
I have very long script line
For each variable in 'Value1', 'Value2', 'Value3' ..... 'Value n+50'
Next
If all values are in one line, everything is ok. But when I try to split them to few lines and make more readable it's come Syntax error. I tried to put all values in the parentheses (), but still doesn't work.
Maybe somebody know how to solve this error, thank you 🙂
Nor exactly what you asked, but you could add all the variable- values to an inline table, and use the peek-function to loop through the values. Something like the following:
tmp:
load * inline [
values
value1
value2
...
];
For i=0 to NoOfRows('tmp')
let vVal=peek('values',i, 'tmp')
/* your code here */
nexi i;
Please mark my answer as a solution, if it resolved your issue.
a similar solution using FieldValueList instead:
tabTemp:
LOAD * Inline [
variable
Value1,
Value2,
Value3,
Value4,
Value5,
Value6,
Value7,
Value8,
Value9,
Value10
];
FOR Each variable in FieldValueList('variable')
...
NEXT
DROP Table tabTemp;