Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Giovane
New Contributor III

Loading a Spreadsheet - Testing Before Loading

I'm loading a spreadsheet on a station outside the server, and I want for testing the connection between the server and the station before the load statement to be performed. This will be done to prevent an error. The idea is: If the connection is active, the load is performed, else the load statement is jumped, and the rest of the script continues  How can I do that?

Thanks a lot !!!

Giovane

1 Solution

Accepted Solutions
MindaugasBacius
Valued Contributor III

Re: Loading a Spreadsheet - Testing Before Loading

I think this is exactly what you wish:

SET ErrorMode=0;

CONNECTION STATEMENT

SET ErrorMode=1;


It simply ignores the errors that occurs on connection statement and moves on to the rest of the script.

I suggest you reading more about ErrorMode and ScriptError variables:

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ErrorVariables/ErrorMo...

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ErrorVariables/ScriptE...

2 Replies
MindaugasBacius
Valued Contributor III

Re: Loading a Spreadsheet - Testing Before Loading

I think this is exactly what you wish:

SET ErrorMode=0;

CONNECTION STATEMENT

SET ErrorMode=1;


It simply ignores the errors that occurs on connection statement and moves on to the rest of the script.

I suggest you reading more about ErrorMode and ScriptError variables:

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ErrorVariables/ErrorMo...

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ErrorVariables/ScriptE...

Giovane
New Contributor III

Re: Loading a Spreadsheet - Testing Before Loading

Thank you, Mindaugas...you got it right. Problem solved !!!

Thanks a lot.

Giovane