Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am seeing an issue with my script intended to identify file existence. I picked up some code outlined in this post: http://community.qlik.com/thread/85612
My code is fairly straight forward. Both of the attempts to set the variable provide the same error "Script line error".
QVD_PATH="../../../QVD/WW/ICM/";
Let fQVD_AAEData= fldQVD & 'AAEData.qvd';
Let vqvdexists = if(FileSize($(fQVD_ICMLog))>0,-1,0);
If FileSize($(fQVD_ICMLog))>0 Then
Let vqvdexists = -1;
Else
Let vqvdexists = 0;
End If
However when I use the resolved value instead of the variable it works.
Let vqvdexists = if(FileSize('../../../QVD/WW/ICM/AAEData.qvd')>0,-1,0);
I have tried other File functions such as QVDCreatetime with the same result.
What am I missing?
John
try adding single quotes around your dollar expansion, as in :
Let vqvdexists = if(FileSize('$(fQVD_ICMLog)')>0,-1,0);
try adding single quotes around your dollar expansion, as in :
Let vqvdexists = if(FileSize('$(fQVD_ICMLog)')>0,-1,0);
Thank you Bill, that’s what I was missing!