March 26, 200520 yr 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
March 26, 200520 yr 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...
March 26, 200520 yr 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
March 28, 200520 yr 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