Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script to modify field

Featured Replies

  • 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?

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?

  • 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?

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 )

  • 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 :

  • Author
  • Newbies

Got it : Thanks for your help!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.