Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In the example below, the variable vSPOTReloadDate remains empty after the PEEK statement. When I try the PEEK function with a 'normally' loaded table, it works just fine. The SPOTProperties table get loaded fine.
I can't find this limitation in the docs. Is this by design or am I missing something here ?
Any help would be greatly appreciated.
Jan
LET vSPOTDate = MakeDate(2010,4,9);
LET vSPOTTime = MakeTime(12,23,56);
SPOTProperties:
LOAD * INLINE
[PropertyID, PropertyName, PropertyValue
0,SPOTReloadDate,$(vSPOTDate)
1,SPOTReloadTime,$(vSPOTTime)];
LET vSPOTReloadDate = Peek('PropertyValue', 0, 'SPOTProperties');
I have the solution :
a QUALIFY statement occured before the code sample I posted. So the correct syntax is :
LET vSPOTReloadDate = Peek('SPOTProperties.PropertyValue', 0, 'SPOTProperties');
So even though the PEEK function takes a 'tablename' as parameter, the fieldname needed to be fully qualified.
Hello Jan.
try that code:
LET vSPOTDate = MakeDate(2010,4,9);
LET vSPOTTime = MakeTime(12,23,56);
SPOTProperties:
LOAD
*,
IF( PropertyID = 0, $(vSPOTDate), $(vSPOTTime)) AS PropertyValue
INLINE
[PropertyID, PropertyName
0,SPOTReloadDate
1,SPOTReloadTime];
LET vSPOTReloadDate = Peek('PropertyValue', 0, 'SPOTProperties');
I create a small example.
Hi Anatoly,
thanks for your quick answer!
Your solution works fine indeed, I just don't understand why ? For Qlikview, what is the difference between our solution (internally I mean)
Jan
I think that in INLINE table Qlikview can't evaluate a variable.
I think it can, because if you open the table viewer and do a 'preview' the data is loaded into the table correctly.
I copied my code into a new empty project and there it works fine. It must be something else in my project messing things up.
Thanks for your help!
Jan
I have the solution :
a QUALIFY statement occured before the code sample I posted. So the correct syntax is :
LET vSPOTReloadDate = Peek('SPOTProperties.PropertyValue', 0, 'SPOTProperties');
So even though the PEEK function takes a 'tablename' as parameter, the fieldname needed to be fully qualified.
Yes, you are right. Inline can evaluate variable. But I didn't understand why you use an QUALIFY statement?