Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Email alert using Error mode

Hi Guys,

I have implemented email-alert on failure of my dashboard and also on successfull completion of my dashboard.

I am using Error mode=0 to create two alerts(one for successful and one for failure). It is working fine and I am getting error description also in my mail body. But big challenge is when error occurs, due to error mode set zero, dashboard with incorrect data model getting distributed to accesspoint. I want t o stop distribution of dashboard incase error occurs.

Any idea will be very helpful here.

1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

So why you are using errormode = 0 when you don't want to reload and distribute the applikation?

My suggest:

1.Do reload your data model in a seperate app.

While using erromode = 0 use scripterrorcount at the end of script.

load the value into a table.

2. Create a second app, use binary load the data model from app 1. Don't use errormode = 0 here and crash application if scripterrorcount >0

3. Create a task with multiple succesfull load tasks. Here use task 1 and 2.

So task 3 will only start if there is no script error.

Regards

View solution in original post

12 Replies
martinpohl
Partner - Master
Partner - Master

So why you are using errormode = 0 when you don't want to reload and distribute the applikation?

My suggest:

1.Do reload your data model in a seperate app.

While using erromode = 0 use scripterrorcount at the end of script.

load the value into a table.

2. Create a second app, use binary load the data model from app 1. Don't use errormode = 0 here and crash application if scripterrorcount >0

3. Create a task with multiple succesfull load tasks. Here use task 1 and 2.

So task 3 will only start if there is no script error.

Regards

Anonymous
Not applicable
Author

Hi Martin,

Thanx for your response. But I am not clear with this concept. Could you please explain more elaborately?

How to crash application by Scripterrorcount>0?

martinpohl
Partner - Master
Partner - Master

write a script that must create an error.

For example:

//Write scripterrocount into variable

let Errors = peek('ErrorCount',0,'Errors');

if $(Errors) > 0 then

abc          //script that doesn't work

else

Trace No errors found;

endif

Anonymous
Not applicable
Author

Ok i got it I need to create two qvw one is for only reloading the script and saving to some qvd and other to binary load first one and check for error, if error occurs it will fail or else it will run and distribute.so incase successful, it will run twice.

But wont that be performance challenge, my application size is big, loading same application twice will be challenging?Is there any other way for it?

Kushal_Chawda

Let the QlikView application run with error.

Create a alert email from QlikView server or from QlikView desktop Alert feature on failure

Once you get the alert email. You can check the log file of the QVW application for error.

martinpohl
Partner - Master
Partner - Master

Hello,

if your application is big, you can store the scripterrorcount into a qvd and do a load from this qvd instead of binary load.

So this app only will habe one table with one field and one value.

Regards

Anonymous
Not applicable
Author

Hi Kush,

Could you pleas tel me how should i implement alert in Qlikview desktop on dashboard failure?Because I am not able to find  a logic to set alert with script error? Could you please tel me the logic

Anonymous
Not applicable
Author

Thanks Martin, your responses are very helpful. But I am not supposed to use alert in different qvw, I want within same dashboard.

Kushal_Chawda

Open your application, go to  Setting -> User Preference -> Mail.

Configure your SMTP server email account. You will get the Alert email from this account on reload.

Now in the same application go to Tool -> Alert -> Click on Add and do the setting as below

Now when application fails to reload mail will be triggered.