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

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

Recommended Posts

  • Newbies
Posted

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?

Posted

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
Posted

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?

Posted

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
Posted

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 :

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