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.

Featured Replies

  • Newbies

I am trying to write a script that will find records when looking in a date field (formatted as date) that is today minus 3 years (to the exact date). I have to run this every month.

Help is appreciated!

Allow User Abort [Off]

Set Error Capture [On]

Enter Find Mode [ ]

Set Field [datefield; Let( T = Get(CurrentDate); Date( Month(T); Day(T); Year(T) - 3 ) )]

Perform Find [ ]

If [not Get(FoundCount)]

Show Custom Dialog ["No records for that date exist."]

End If

Or create an unstored calculation date field of Let( T = Get(CurrentDate); Date( Month(T); Day(T); Year(T) - 3 ) ) and a relationship from this field to your date field. Then a script like

If [isEmpty(relationship::serial)]

Show Custom Dialog ["No records for that date exist."

Else

Go to Related Record [show only related; "relationship"]

End If

"today minus 3 years (to the exact date)"

So if today was 29 February 2004, what date should the calculation return?

  • Author
  • Newbies

It worked - thanks a million!

Is there any good resource for scipts that give examples? I used to do a bit of Visual Basic but it's been a while...there's lots of other parts to this project I want to put together in one script. Thanks for your help!

You might be better off using a number of short scripts which are called by your main script. Sort of like using subroutines.

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.