Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Tracking an Error

Hi Friends,

I have following data load script in my QV file. This runs perfectly. But I am unable to track the error in file  correctly with insufficent details such as file name. Also I want to show the file name that is being run during the script execution. Kindly help me me solve those issues please.

Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')
Data:

LOAD 0 as dummy AutoGenerate 0;

Concatenate (Data)

LOAD *

FROM
$(vFileName)

(ooxml, embedded labels, table is Sheet1);
Next vFileName;
DROP FIELD dummy;
ErrorList:


First 1 Load

Date(today(),'YYYYMMDD') As ExecuteDate,
FileName() As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;

 

error log file

upaliwije_0-1593511586256.png

 

 

1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

I guess you should use:

Date(today(),'YYYYMMDD') As ExecuteDate,
'$(vFileName)' As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;

 

To see the files in which the error occurred in the logs you have to use:

Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')

TRACE '$(vFileName)';

View solution in original post

1 Reply
Highlighted
Specialist III
Specialist III

I guess you should use:

Date(today(),'YYYYMMDD') As ExecuteDate,
'$(vFileName)' As FileName,
'$(ScriptErrorCount)' As Error_Seq,
'$(ScriptError)' As ErrorName,
'$(ScriptErrorDetails)' As ErrorDetail
AutoGenerate 1;

 

To see the files in which the error occurred in the logs you have to use:

Set ErrorMode = 0;
For each vFileName in Filelist ('Z:\CLAIMS_NEW_2020\MAY\??CLMMAY.xlsx')

TRACE '$(vFileName)';

View solution in original post