Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

where to change the script , so it will load the file name i want QV to load ?

Hi All

My below script work fine , May i know how to make it load only below 3 file ?

vFile1

vFile2

vFile3

Now it load all row data at C:\TEST , May i know how to modify the script ?

SET vDevelopment = 30;

IF $(vDevelopment) = 0 THEN

ELSEIF $(vDevelopment) = 30 THEN

  SET vRAWPath = 'C:\TEST\'; //local folder

 

  set vFile1 = 'Q_Payment_KL';

  SET vFile2 = 'Q_Payment_Penang';

  SET vFile3 = 'Q_Payment_TID';

 

  else

END IF

For each vFileName in FileList('$(vRAWPath)\*.txt')

ARSummary:

LOAD left(FileBaseName(), 4) AS Report5_pay,

  FileBaseName() as SOURCE,

  @1:9T as [cust_id],

  @10:38T as [company_pay],

  if(right(@81:99T,1)='-', '-' & left(@81:99T, len(@81:99T)-1),@81:99T) as curren

FROM "$(vFileName)" (ansi, fix, no labels, header is 0, record is line); 

Next vFileName

Remark :- Pls unzip the file to C:\TEST for testing.

11 Replies
paulyeo11
Master
Master
Author

Hi Rahul

I already have the solution from Staffan.

Paul

paulyeo11
Master
Master
Author

Hi Sir

After i test your script , i found some bug , can you assist me pls ?

Re: How to make my script after load 1st txt file and don't stop there and load 2nd txt file ?