Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi Keerthi,
Just make like this.
Let vTest =num(ScriptError);
Hope this helps.
Andrei
See this:
set ErrorMode=0;
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 |
set ErrorMode=0;
load * from abc.qvw;
if ScriptError=8 then
exit script;
//no file;
end if
Regards
Aviral Nag