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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script error


Script error function is not returning the numeric value instead string is being displayed.

How to get the numeric value of the error?

Load * from ABC.qvd;

Let vTest =ScriptError;

// no file exits.

8 should have been assigned to variable instead File Not Found is assigned.

2 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi Keerthi,

Just make like this.

Let vTest =num(ScriptError);

Hope this helps.

Andrei

aveeeeeee7en
Specialist III
Specialist III

See this:

set ErrorMode=0;

ScriptError

Returns the error code of the last executed script statement. This variable will be reset to 0 after each successfully executed script statement. If an error occurs it will be set to an internal QlikView error code. Error codes are dual values with a numeric and a text component. The following error codes exist:

1

No error

2

General Error

3

Syntax Error

4

General ODBC Error

5

General OLE DB Error

6

General XML Error

7

General HTML Error

8

File Not Found

9

Database Not Found

10

Table Not Found

11

Field Not Found

12

File Has Wrong Format

Example:

set ErrorMode=0;

load * from abc.qvw;

if ScriptError=8 then

exit script;

//no file;

end if

Regards

Aviral Nag