Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview function

Is there a function in qlikview which is like iserror in excel ?

1 Solution

Accepted Solutions
Not applicable
Author

5 Replies
Not applicable
Author

hi, check this out

http://community.qlik.com/thread/79941

rgrds

Dushan

tresesco
MVP
MVP

Search for Error Variable, ErrorMode, ScriptError in the help.

Error Variables

The following variables can be used for error handling in the script:

ErrorMode
ScriptError
ScriptErrorDetails
ScriptErrorCount
ScriptErrorList

The values of all five variables will remain after script execution. The
value of the last four variables, for error handling inside the script, is of
course dependent on the use of ErrorMode=0.

ErrorMode

This variable determines what action is to be taken by QlikView when an error
is encountered during script execution. By default (ErrorMode=1) the script execution will halt and the user will
be prompted for action (non-batch mode). By setting ErrorMode
=0
QlikView will simply ignore the failure and continue script execution
at the next script statement. By setting ErrorMode =2
QlikView will trigger an "Execution of script failed..." error message
immediately on failure, without prompting the user for action beforehand.

Example:

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:

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

Example:

set ErrorMode=0;

load * from abc.qvw;

if ScriptError=8 then

exit script;

//no file;

end if

ScriptErrorDetails

Returns a more detailed error description for some of the error codes above.
Most importantly this variable will contain the error message returned by ODBC
and OLE DB drivers for error codes 3 and 4.

ScriptErrorCount

Returns the total number of statements that have caused errors during the
current script execution. This variable is always reset to 0 at the start of
script execution.

ScriptErrorList

This variable will contain a concatenated list of
all script errors that have occurred during the last script execution. Each
error is separated by a line feed.

Appropriate use of them would help you.

Not applicable
Author

Hi ,

The Alt Function worked perfectly ...Thanks a lot !

Regards,

Keerthi

Not applicable
Author

hi, if you got the answer, mark it as the correct answer. then anyone can get the answer in future in straight

Not applicable
Author

Done