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.

Find records where date will become due within 30

Featured Replies

  • Newbies

I am building a small database that tracks tools that require calibration. I made a field called "Calibration Due" that contains a manually entered date when the calibration expires. I want to generate a report (at the click of a button, script) that will give me a list of tools that will expire in the next 30 days. I can't figure out how to do the "find" and save it as a script.

Any thoughts?

Thanks

Dave

Woodley:

Welcome to the Forums.

You can make a script like this:

Enter Find Mode[]

Set Field ["Calibration Due"; "<" & (Status[Current Date]+31)

Perform Find[]

and voila, you've got your list of items that have calibrations due within the month (or which are overdue). Remember, this depends on the user's system calendar being correct, because that's where the Status[CurrentDate] comes from...

You can also put in Error Correction to jump out of the script, should there be no valid entries.

-Stanley

PS: I'd just like to point out that I had to correct myself three times on this, as I kept getting the < and > backwards, and the + and - too... hopefully the finished product is correct. 4:20 on Saturday morning at the end of a long week of programming is no time to do this sort of thing...

  • Author
  • Newbies

Stanley,

Thank you for the reponse. The only problem is... I'm lost. I can't seem to enter the following information that you specified, into the script:

Set Field ["Calibration Due"; "<" & (Status[Current Date]+31)

I get this far: Set Field ["Calibration Due"] but that's as far as I get. I don't understand how to get the whole thing in there. (dang I feel stupid)

Dave

A start

1. Create a new script

2. Select "Set Field" command (double click Set Field in left column so that it appears in right column)

3. Click "Specify Target Field" and select "Calibration Due" field

I am assuming you have set "Calibration Due" as a calculation field beforehand

4. Click "Specify" after "Calculated Result"

5. Double-click the "<" symbol (and put "" before and after < symbol), then the & symbol. (These will then appear in big white box)

6. From the View Menu, select the Get Functions

7. Double-click Get(Current Date)

8 Type in +31, then press enter

Hope This Helps

Frank B

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.