Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I run my script I see the status in the Script Execution Process window and when it get to the last step it just sits there without making any progress. I assumed the last step was causing a failure/hang, but when I look at the log I see: "Execution finished."
To make matters worse, if I press the Abort button the entire app crashes so I am never actually able to use the data.
Any insight into what is happening?
Something like this (may need some tweaking, don't have QV available at the moment):
LogCalendar:
LOAD $(vMinDate) + IterNo() -1 AS LogDate
AUTOGENERATE 1
WHILE $(vMinDate) + IterNo() -1 <= $(vMaxDate);
LEFT JOIN (LogCalendar)
LOAD LogDate, LogDate + ((IterNo() - 1) / 24.0) AS LogTime
RESIDENT LogCalendar
WHILE IterNo() <= 24; // IterNo() should run from 1 to 24
Good luck,
Peter
Hi,
subject to the amount of dates, might be that the construction with variables may require lot of time.
I would suggest to create the calender on basis full days, like:
Calendar:
LOAD
$(vMinDate) + IterNo() AS CalenderDay
AUTOGENERATE 1
WHILE $(vMinDate) + IterNo() <= $(vMaxDate);
Hours:
JOIN (Calendar) LOAD
ITERNO() AS Hour
AUTOGENERATE
1
WHILE
ITERNO() < 25;
This calendar then might be reloaded with additional formulas, like TIMESTAMP, WEEK, MONTH etc.
edit: Might also make sense, to check on Min/Max-Date for unplausible entries
edit2: Please drop table Hours, when no longer used.
HTH Peter
Thank you all for your wonderful suggestions (I will have to incorporate some of them)...but it turns out there was an error in a OnPostReload Trigger Action that was causing the hang!!!
After removing all my OnPostReload actions the script executes/exits normally.