Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

break loop

Hi all,

i have created a table 'PathNames' where i have a number of paths to xls files.

Then i am looping through this table and read every xls from every directory i listed in 'PathNames':

FOR j = 0 to NoOfRows('PathNames') - 1

          LET vPath = Peek('PathNames', $(j), 'PathNames');

          For vYear = 2012 to $(vCurrentYear)

                    set vFunction = 'Function: R&D';

LOAD...

Problem is: When a path does not exist (because either the file or the target directory has been removed) my LOAD fails, because QV cant find the patch. ("Cannot open file... ")

How can i work around this - meaning: How can i skip paths that dont exist and continue with the next path in 'PathNames' ?

Hope, the issue is clear.

Thanks for some advise.

K

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can use Set ErrorMode = 0;

View solution in original post

3 Replies
Anonymous
Not applicable
Author

You can use Set ErrorMode = 0;

Not applicable
Author

got it. thanks!

Not applicable
Author

Great! Thanks