Discussion Board for collaboration on QlikView Scripting.
I am using Qlikview 11.2. I have this following table
The table will have only four rows and i need to take each condition into a variable.
I have created four variables Condition1,Condition2,Condition3,Condition4.
I am using the following script
SQL SELECT Color = 255,
Condition As Cond,
"Max_Value" AS UL,
"Min_Value" AS LL
LET Condition1 = FieldValue('Cond',1);
LET Condition2 = FieldValue('Cond',2);
LET Condition3 = FieldValue('Cond',3);
LET Condition4 = FieldValue('Cond',4);
The result when using the table above is
Condition1 = Between
When i execute the script only the first variable is assigned the value('Between') and the other variable are NULL;
If i have a different string(i.e. other than 'between' as in the table below) all the variables are getting their values assigned.
The result when using this table is
Condition2 = one
Condition3 = two
Condition4 = three
Can anyone help me with this?
Go to Solution.
Use "PEEK" instead of "FieldValue"....Field Value wont consider the Duplicate records..
LET Condition1 = Peek('Cond',0,'Table');
LET Condition2 = Peek('Cond',1,'Table');
LET Condition3 = Peek('Cond',2,'Table');
LET Condition4 =Peek('Cond',3,'Table');
Thanks a lot for the quick and correct response.
I was having trouble with FieldValue and did not know other options.