June 18, 200916 yr Newbies 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?
June 18, 200916 yr 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?
June 18, 200916 yr Author Newbies 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?
June 18, 200916 yr 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 )
June 18, 200916 yr Author Newbies 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 :
Create an account or sign in to comment