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.

perform script not skipping and exit

Featured Replies

i am trying to write a script which fires on the first of the month. but it always fires no matter what the date.

 

trigger birthdays send
If
[ Date ( Month ( Get (CurrentDate) ) -0 ; 1 ; Year ( Get (CurrentDate) ) ) ]

Perform Script [ “Birthdays report this month” ]

Else

Exit Script [ ]

End If 

Try

If[Get(CurrentDate) = Date ( Month ( Get (CurrentDate) )  ; 1 ; Year ( Get (CurrentDate) ) ) ]

Your calculation returns the date of the first of the month, which is always greater than 0, and therefore always true.

 

Edit:  Actually you could get away with just If[Day(Get(CurrentDate)) = 1]

Edited by doughemi

If you want to see if today is the first of the month, then you should test for:

Day ( Get (CurrentDate) ) = 1

Your test calculates the date of the first of the month, and places it inside an If[] - that will always return true.

Note also that if for some reason your script doesn't run on the first of the month (e.g. because it's weekend or a holiday), then the next earliest time the test will return true is a month from now. So you might offend all those whose birthday is this month.

 

 

 

Edited by comment

  • Author
16 minutes ago, comment said:

If you want to see if today is the first of the month, then you should test for:


Day ( Get (CurrentDate) ) = 1

 

thanks for the answer, i have just started using FMserver and trying to get some PDF reports done in the back ground and as FMserver does not do PDF natively i will try to write an applescript to fire an ical  event on the first of the month.

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.