2 Replies Latest reply: Sep 4, 2014 12:46 PM by John Cahill RSS

    Line Script Error with Variables in File Functions

    John Cahill

      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