Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Check if script has run today or if file has been opened today

Featured Replies

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

The best way, IMHO, would be to make a record of the script having run successfully on date [today].

...and use the existence of that record as the criteria as to whether to run the report or not.

... if that wasn't obvious. :unsure:

---

BTW, it could be just one record with the date being updated on each run.

Edited by comment

  • 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?

Yes. If using a single-record settings table:

...

If [ not Get (LastError) ]

Go to Layout [settings]

Set Field [ Settings::LastReport ; Get (CurrentDate) ]

End If

..

  • Author

That's it - thank you!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.