Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a pdf distribution task that needs to be triggered on successful load of the application. However, the pdf distribution task should not get triggered if there's no data for the previous day. The previous day is stored in a Field "Data as of".
So the PDF needs to be triggerd if
1. The application is successfully reloaded
2. The value of the field "Data as of" is Today()-1
I don't find any option in the management console to control the trigger with a combination of these conditions. Any idea how and if this can be achieved?
I am OK even with another workaround.
1. I set the pdf to get triggered on successful reload of the application
2. I force the application to fail to load if value of the field "Data as of" <> Today()-1
This way the pdf won't get distributed as the application would have failed to load.
However, I am not sure how to make the application to fail the reload on a given condition.
Please let me know if you have any other suggestions that would help me from sending out obsolete reports to the users if there's no data for previous day.
Thanks in advance,
Bhaskar
I don't know about the reports, but I can tell you how you can fail the reload of your application. Check out the following load script (example.qvw is also attached):
Let vDataAsOf = PEEK('Data as of'); //This gets the value in your [Data as of] field
Set ErrorMode = 1; //This makes sure the reload will fail
IF vDataAsOf <> today()-1 then //If the [Data as of] date is not equal to yesterday, drop a table that doesn't exist, so the reload will fail
drop table faketable;
endif