Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
anupamajagan
Creator
Creator

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

dennisnet
Partner
Partner

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

anupamajagan
Creator
Creator
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);