Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

Can a file be ignored in a load and not fail the load?

I have a script where i load Filename*.xlsx.

 

On some occasions there will be no file but i do not want the script to fail as there are other files to be imported to the same application.

Is there a way to ignore load tab if there is no file matching the specified filename and not fail the rest of the load?

 

thank you in advance.

 

Daniel

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

You can use Set ErrorMode = 0; to ignore errors and keep running the script. Once you finish the specific section where you want errors ignored, you should use Set ErrorMode = 1; to return to normal mode.

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVa...

 

View solution in original post

4 Replies
Or
MVP
MVP

You can use Set ErrorMode = 0; to ignore errors and keep running the script. Once you finish the specific section where you want errors ignored, you should use Set ErrorMode = 1; to return to normal mode.

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVa...

 

davyqliks
Specialist
Specialist
Author

Thank you so much,

where should this be added please?

Set ErrorMode =0;

on each page? before the load instruction?

davyqliks_0-1669204627891.png

 

i tried before a concatenate on a load which had no file and the error still came up cannot fine file.

davyqliks_1-1669204677263.png

 

thank you

Or
MVP
MVP

You would need to set ErrorMode = 0 before whatever sequence of code you want to ignore errors for. You would set it back to 1 after that sequence, when you want errors to stop the script again. If you don't set it back to 1, it'll just stay 0 and ignore all errors.

Note that this does not prevent the error from happening, it just keeps running the script when the error occurs.

davyqliks
Specialist
Specialist
Author

Thank you for confirming,

Much appreciated.

 

Daniel