Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

malbordio
Not applicable

Query showing a result like 0 when the site is down or not responding

I have the following query loaded in Qlikview that returns results from a website (works fine) but I want to display a result when, for example, the site is down or not responding (something like else or if null).

LOAD

Server  as JDBCDSMonitorServer,

Runtime  as JDBCDSMonitorRuntime,

Failures  as JDBCDSMonitorFailures,

Waiting  as JDBCDSMonitorWaiting,

State  as JDBCDSMonitorState

FROM

"http://url"

(html, codepage is 1252, embedded labels)

;

How should I have the query showing a result like 0 when the site is down or not responding? Many thanks for the help!

Tags (1)
1 Solution

Accepted Solutions
malbordio
Not applicable

Re: Query showing a result like 0 when the site is down or not responding

I added the following in the initial code and it works.

SET ErrorMode = '0';

2 Replies
swuehl
Not applicable

Re: Query showing a result like 0 when the site is down or not responding

Maybe you can set the ErrorMode to zero in your script before accessing the remote server, then check for ScriptErrorCount directly after your LOAD. If an error occured, branch into some error handling like creating zero values for your fields or whatever you want.

See the HELP for the error system variables or e.g.

Error handling in script

malbordio
Not applicable

Re: Query showing a result like 0 when the site is down or not responding

I added the following in the initial code and it works.

SET ErrorMode = '0';