Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Suppress error message at script runtime

I have a list of fields that I want to get dropped from the tables that get loaded in a loop.

FOR each tablename in $(varTableNames)

LOAD * ; select * from $(tablename);

DROP Fields $(varFieldNames);

NEXT;

The varFieldNames is a comma separated list of some random fields in the form of 'Table1.field1','Table2.field5' etc.. Now e.g. if the tablename is not the Table1 I get a pop-up with the error message "wrong field name in the drop fields statement" or something for the Table1.field1. It breaks the script execution.

Is there a way to suppress that behavior? I just want to ignore the those errors and let the script run through.

1 Solution

Accepted Solutions
vidyut
Contributor II

Re: Suppress error message at script runtime

put Set ErrorMode=0; before the loop. That should suppress the errors.

3 Replies
vidyut
Contributor II

Re: Suppress error message at script runtime

put Set ErrorMode=0; before the loop. That should suppress the errors.

Not applicable

Re: Suppress error message at script runtime

Check out

Error Variables

  in the help file to supress the errors

Not applicable

Re: Suppress error message at script runtime

Thanks for the answers they both were helpful. What I had to do on top is just to up the "drop field" statement into a loop. Because otherwise the "drop fields" would not drop any field if at least one could not be found.

Community Browser