Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

editor lines fetched = 0

We have the below data editor, which when loaded is fetching 0 lines from each file. We can't understand why the problem is persisting since we have already used the same editor text in other apps, which has worked fine up to today.

SET ZLoadDirectory = '[lib://April17Analysis_24.4.17/]';

SUB LoadDirectory (ZLoadDirectory)

FOR each Repository in 'TR2', 'TR3', 'TR4', 'TR5', 'TR6', 'TR7', 'TR8', 'TR9', 'TR10', 'TR11'
      FOR each File in filelist (ZLoadDirectory & '$(Repository)' & '.xml')
        //TRACE $(File)
        [TR]:
        Load
          FileName() as fileName,
          [New/CmonTradData/CtrctData/NtnlCcyFrstLeg] AS NotionalCurrency,
          [New/CtrPtySpcfcData/CtrPty/RptgCtrPty/Id/LEI] AS RprtngCtrptyLEI,
          [New/CtrPtySpcfcData/CtrPty/OthrCtrPty/Id/LEI] AS OthrCtrptyLEI,
          [New/CmonTradData/TxData/TradClr/ClrSts/Clrd/CCP/LEI] AS CcpLEI,
          [New/CtrPtySpcfcData/CtrPty/Bnfcry/LEI] AS BeneficiaryLEI,
          [New/CtrPtySpcfcData/CtrPty/Brkr/LEI] AS BrokerLEI,
          [New/CtrPtySpcfcData/CtrPty/ClrMmb/LEI] AS ClearingMemberLEI,
          [New/CtrPtySpcfcData/CtrPty/SubmitgAgt/LEI] AS SubmittingAgentLEI,
          [New/CmonTradData/TxData/NtnlAmt/Amt] AS NotionalAmt,
          [New/CmonTradData/CtrctData/UndrlygInstrm/IdNotAvlbl] AS UnderlyingNoID,
          [New/CmonTradData/CtrctData/AsstClss] AS AssetClass,
          [New/CmonTradData/CtrctData/CtrctTp/CtrctForDiff/NoAddtlAttrbts] AS ContractForDifference,
          [New/CmonTradData/CtrctData/CtrctTp/Futr] AS Future,
          [New/CmonTradData/CtrctData/CtrctTp/Optn/OptnTp] AS OptionType,
          [New/CmonTradData/CtrctData/CtrctTp/Swp] AS Swap,
          [New/CmonTradData/TxData/UnqTradIdr] AS UTI,
          [New/CmonTradData/TxData/TradgVn] AS TradingVenue
        From [$(File)]
        (XmlSimple, 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)

Tags (1)
Community Browser