Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7184 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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...

  • Newbies
Posted

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

Posted

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

This topic is 7184 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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