Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I have the below code in one of my Flag.QVW's and the plan is to check for a flag Field "LOG_SUCCESS"
from DB which should be 'Y' and the I want the QVW to reload. After this I want a set of QVDs(or QVWs) to reload based on the sucessful reload of Flag.QVW
I am thinking this is simple, but isnt feeling confident doing it. Can someone please explain the process in a bit detail how this can be achieved?
Thanks a Ton in advance,
ANDY
LOAD
PROGNAME,"LOG_START_DATE"
,
"LOG_END_DATE"
,
"LOG_PARAMS"
,
"LOG_SUCCESS";
SQL
FROM
"OPS$WSFONV"."W_ONVGLO_JOB_LOGGING"
WHERE
PROGNAME = 'w_onvdwh_orders_pkg.summarise_orders'
SELECT *Hello Andy,
Although I have replied to the other post, I'll do here as well:
LOADPROGNAME,"LOG_START_DATE","LOG_END_DATE","LOG_PARAMS","LOG_SUCCESS";SQL SELECT * FROM "OPS$WSFONV"."W_ONVGLO_JOB_LOGGING"WHERE PROGNAME = 'w_onvdwh_orders_pkg.summarise_orders' LET vFlag = FieldValue('LOG_SUCCESS', 1); IF '$(vFlag)' <> 'Y' THEN SET ErrorMode = 1; // don't ignore errors ABC; // This doesn't exist, so it will generate an error EXIT SCRIPT; // stop executing script (not needed, but for clarificaton)END IFHope that helps
Hello Andy,
Although I have replied to the other post, I'll do here as well:
LOADPROGNAME,"LOG_START_DATE","LOG_END_DATE","LOG_PARAMS","LOG_SUCCESS";SQL SELECT * FROM "OPS$WSFONV"."W_ONVGLO_JOB_LOGGING"WHERE PROGNAME = 'w_onvdwh_orders_pkg.summarise_orders' LET vFlag = FieldValue('LOG_SUCCESS', 1); IF '$(vFlag)' <> 'Y' THEN SET ErrorMode = 1; // don't ignore errors ABC; // This doesn't exist, so it will generate an error EXIT SCRIPT; // stop executing script (not needed, but for clarificaton)END IFHope that helps
Hello Miguel,
Thanks for the quick reply, I have used this and in the QEMC, I have selected to Run the Orders QVW if this Flag.QVW was sucessful. I was wondering how would that work though. Because I have a flag and how will it determine that the Flag.QVW was sucessfull and start another task? Also that flag is Y on that day when it runs every morning sometime at 4 am. Hope you understood my query and can you please explain more about this process?
Thanks Again,
ANDY
Hello Andy,
QlikView Server considers successful when the reload takes place without reported problems (the script runs fine). Likewise, it marks as failed when the reload task fails (the script returns any error if the document is configured to do so).
The script I proposed above makes the script error and make the reload to fail when the field LOG_SUCCESS is not equal to 'Y' (note the uppercase). In this case, the second task shouldn't reload.
Hope that helps.
Hello Miguel,
That was really simple but yet for me it was kinda tricky. But thats clear now and I understood what we are trying to do. Can you please suggest me or tell me the steps real quick to schedule a reload of a document? I tried doing it and selected on Event of Sucessfull for this Flag file and selected the QVWs which refresh the QVDs, however I can see in the STATUS - > TASKS there is a failed file, I dont know why, how to delete that? I was also looking for a easy manual handy to schedule the tasks and delete some old tasks which failed etc.
Can you please help me with this regards,
Thanks a Ton
ANDY