7 Replies Latest reply: Mar 29, 2017 7:27 AM by Sunny Talwar RSS

    Field not found

    Roberta Darmanin

      Hi, I am very new to Qlik Sense. Any help on the below would be highly appreciated.


      I am trying to upload a specific variable from multiple XML files. Please note the variable in question in all files has the same heading as listed in the script. The script has worked before, so have no clue why this error is being generated only now.


      The attached pic shows the error being generated.


      Below is the script. Thanks


      SET ZLoadDirectory = '[lib://Qlik_ExtractsForLoading/]';

      SUB LoadDirectory (ZLoadDirectory)

      FOR each Repository in 'TR_1', 'TR_2', 'TR_3', 'TR_4', 'TR_5'
          FOR each File in filelist (ZLoadDirectory & '$(Repository)' & '.xml')
              //TRACE $(File)
                FileName() as fileName,
                [New/CmonTradData/TxData/UnqTradIdr] AS UTI
              From [$(File)]
              (xml, embedded labels, table is [BizData/Pyld/Document/EMIRTradRpt/TradData/Rpt/Tx])
              Where Len([New/CmonTradData/TxData/UnqTradIdr]) > 0;

            NEXT File
          NEXT Repository
          FOR each Dir in dirlist (ZLoadDirectory&'\*')
            CALL LoadDirectory(Dir)
          NEXT Dir
      END SUB

      CALL LoadDirectory (ZLoadDirectory)