Newbies deanwall Posted June 18, 2009 Newbies Posted June 18, 2009 We have an FM database to record records of PAT Testing. One of the layouts is a report that shows all of the tests carried out. I have a field named "Restest date" and another field named "Retest Due" I want to create a script that looks through the list of records, and adds 'DUE' the the Retest Due field on all records where the Retest Date is before todays date. Is this possible?
mr_vodka Posted June 18, 2009 Posted June 18, 2009 Enter Find Mode [] Set Field [ "<" & Get (CurrentDate) ] Set Error Capture [On] Perform Find [] If [ Get (FoundCount) ] Replace Field Contents [ Retest Due; "Due" ] End If However, why not just have Retest Due be a calc instead?
Newbies deanwall Posted June 18, 2009 Author Newbies Posted June 18, 2009 I thought that, but then I thought that it would only update the Retest Due field if the record was modified? Would it auto update when the "Restest Date" had passed?
mr_vodka Posted June 18, 2009 Posted June 18, 2009 Also if this is just for display, then you can use put a copy of the Restest date field on your layout, and format the date field as a Custom Date format of "Due" ( Select Field and then under the format menu --> Date ) You can then apply conditional formatting to the field where when Self ≥ Get ( CurrentDate ), you change the color of the text to white ( or whatever your background color is )
Newbies deanwall Posted June 18, 2009 Author Newbies Posted June 18, 2009 OK, I'm going to go with making Retest Due a calc field. Not too sure about the calculation though, There is no field with the current date in the table, would I have to create that? Total newbie to Filemaker, calculations etc are a bit daunting at the moment :
Newbies deanwall Posted June 18, 2009 Author Newbies Posted June 18, 2009 Got it : Thanks for your help!
Recommended Posts
This topic is 5638 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 accountSign in
Already have an account? Sign in here.
Sign In Now