3 Replies Latest reply: Feb 25, 2016 10:34 AM by Oliver Annells RSS

    Must_Include unknown statement error

    Oliver Annells

      Hi


      I am trying to use the $(Must_Include) system variable to load in some common variables from a text file.  When reloading I am getting a script error - Unknown statement ÿþ/


      The bizarre thing is the contents of the text file was copied from a working script and after the script error I have copied the contents of the text file back into the script without error...


      Can anyone shed any light or suggest a fix?


      Other than the generated format variables the script only contains this:

      $(Must_Include=Constants.txt);

      The file is stored in the same folder as the document.


      The Constants.txt contains the following text:

      SET HidePrefix    = '%';   
      SET ServerPath    = '\\dtqv\qlikview docs\draper\QVD Builders\QVD Files\';   
      SET Months   = '*January','*February','*March','*April','*May','*June','*July','*August','*September','*October','*November','*December';   
      SET Domain   = 'WIN2003DOMAIN\';   
      SET n    = 4;   
      SET MiscOrderCodeExclusions   = 910, 913;   
      SET CreditTypeExclusions   = 3, 10, 11, 13, 20;   
      //     3 = Extra discount on goods retained  
      //    10 = Incorrect Price Charged  
      //    11 = Incorrect Discount Charged  
      //    13 = Carriage charged in error  
      //    20 = Lost/Damaged in transit  
      SET _Today   = today(1);   
      //SET URL    = SEE [SalesData TAB]   
        
      LET LF   = chr(10); // Line Feed   
      LET SQ   = chr(39); // Single Quote (Apostrophe)   
      LET ThisMonth   = num(month($(_Today)),'00');   
      LET LastMonth   = num(month(addmonths($(_Today),-1)),'00');   
      LET ThisMonthName   = date($(_Today),'MMM');   
      LET LastMonthName   = date(addmonths($(_Today),-1),'MMM');   
        
      LET ThisDoc   = documentname();   
      //LET DocumentPath   = left(replace(documentpath(),'X:\','\\dtqv\qlikview docs\'),index(replace(documentpath(),'X:\','\\dtqv\qlikview docs\'),ThisDoc)-1);   
      LET CONCATENATE    = '';   
      LET Show   = True();   
      LET Hide   = False();   
        
      FOR i    = 0 to 3   

          LET YEAR$(i)     = year(now())-$(i);   

      NEXT i;  
      LET i   = NOTHING;   

       

      Thanks

      Oli