Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

andreyfcdk91
New Contributor III

Fetch Error code value in the variable

Good day!
Can anyone advice please, if is it possible to fetch script error code in the variable?
Like:
Set vCheck=ScriptError

if(vCheck=0) then

//Continue

Else

//Stop

End if

Thanks.

1 Solution

Accepted Solutions

Re: Fetch Error code value in the variable

Yes.  To get the number of the script error:

LET vCheck=num(ScriptError);

to get the text of the ScriptError:

LET vCheck=ScriptError;


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

4 Replies
YoussefBelloum
Esteemed Contributor

Re: Fetch Error code value in the variable

read the comment of MLH Group Jameson this  Re: Error handling in script

el_aprendiz111
Valued Contributor

Re: Fetch Error code value in the variable

Hi

0

No error

1

General error

2

Syntax error

3

General ODBC error

4

General OLE DB error

5

General custom database 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

13

BIFF error

14

BIFF error encrypted

15

BIFF error unsupported version

16

Semantic error

SET ErrorMode = 0;

LOAD * FROM mydfile.qvd (qvd);

IF ScriptError>1 AND ScriptError<>8 THEN
TRACE File not found;
ELSE
TRACE File loaded;
END IF

SET ErrorMode = 1;

Re: Fetch Error code value in the variable

Yes.  To get the number of the script error:

LET vCheck=num(ScriptError);

to get the text of the ScriptError:

LET vCheck=ScriptError;


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

andreyfcdk91
New Contributor III

Re: Fetch Error code value in the variable

Thanks, Rob!

Community Browser