2 Replies Latest reply: Mar 20, 2017 11:43 PM by Shanmuga Subbiah RSS

    Not able to filter Sub routine result set

    Shanmuga Subbiah

      Hi Qlikers,


      I'm having an issue in extracting the particular txt file from the task log folder. So, I got the below sub routine from community and modified accordingly to do my task as below,


      sub ScanFolder(Root)

        for each FileExtension in 'txt'

        for each FoundFile in filelist( Root & '\*.' & FileExtension)


        LOAD '$(FoundFile)' as SourceFile,

        FileTime( '$(FoundFile)' ) as Filetime


        Set vConcatenate = Concatenate;

        next FoundFile

        next FileExtension

        for each SubDirectory in dirlist( Root & '\*' )

        call ScanFolder(SubDirectory)

        next SubDirectory

      end sub;


      Step 1 : Call the sub routine to extract all the txt files from the root folder (including sub folders).


      Call ScanFolder ('myfolder\Log');


      Step 2 : Do a resident load from the sub routine result set table and then filter the data based on the task name.






      RESIDENT FileList

      WHERE SourceFile LIKE '*Reload_Task_Check';


      But after this step 2 I'm not getting the desired result. Only the FileList table is there, but not the FinalFileList table is generated.


      Can you please help me here.



      Shan S