Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Field value - Reload

Hi All,

Is it possible to check a value in a table and based on that is it possible to stop a scheduled refresh?

As of now all our dashboards run every morning at 5 am. But some days the DB reload gets delayed due to some issues and so the dashboards reload with no data.

To avoid this , DB team has come up with a table called db_availability. this has values like true or false. True being DB reload completed and successful and false - still running or failed DB reload.

Is it possible to check these values during the scheduled run and only when the value true start the reload or else the reload shouldn't happen.

Any help would be much appreciated. Kindly let me know if the requirement is unclear.

Thanks,

Anupama Jagan

5 Replies
Clever_Anjos
Employee
Employee

You can use a small trick

Create a small qvw that has a script similar to this

SQL

Select status from db_availability;

Let check=peek('status');

If check = 0 then

Store unexsitingtable into xxx.qvd(qvd);// This will cause an error

endif

So at QMC schedule your dashboards to run after sucess into that small qvw. Since it fails, your dashboards won´t reload, keeping their data

Anonymous
Not applicable
Author

or instead of the error use:

If check = 0 then

Exit script;

endif

🙂

Clever_Anjos
Employee
Employee

Exit script does not generate an error, so your qvw will succeed and next task will execute

Anonymous
Not applicable
Author

Hi Clever Anjos,

I just have a small doubt..our status actually has value true or false . so does peek change the true /false to 1/0?

Thanks,

Anupama Jagan

Clever_Anjos
Employee
Employee

I´m assuming it´s value 0/1, (Had no clue about it )
You can trace the value so you can make the proper change

SQL

Select status from db_availability;

Let check=peek('status');

trace value of check = $(check);