March 23, 201213 yr Hello, I've searched for an answer to my problem here and on Google but have not found one yet. Can anyone help? I have an Open Script that generates a report, saves as pdf and sends it as an email attachment if criteria are met. How do I check if either the file has been opened today or if the script has run today so as to avoid generating the same report and email numerous times on the same day? Cheers, Alvise
March 23, 201213 yr The best way, IMHO, would be to make a record of the script having run successfully on date [today].
March 23, 201213 yr ...and use the existence of that record as the criteria as to whether to run the report or not.
March 23, 201213 yr ... if that wasn't obvious. --- BTW, it could be just one record with the date being updated on each run. Edited March 23, 201213 yr by comment
March 23, 201213 yr Author How would I report a successful script run? By setting a "successful run" date field with today's date as the last script step?
March 23, 201213 yr Yes. If using a single-record settings table: ... If [ not Get (LastError) ] Go to Layout [settings] Set Field [ Settings::LastReport ; Get (CurrentDate) ] End If ..
Create an account or sign in to comment