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

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

Recommended Posts

Posted

Hi,

One of the most frustrating aspects of Filemaker for me is that you can't insert a variable or field in a "Perform Find" script step... i.e. you can't

"Find by a date before Field1 and after Field2."

I'd like to allow my users to enter a start date and end date in global fields and find records with a CreationDate field in that range when clicking on a button. What's the best way to do this?

Thanks!

Posted

Assuming Field 1 (gDate1) is after Field 2 (gDate2)

Enter Find Mode

Set Field [CreationDate, GetAsText (gDate2) & "..." & GetAsText (gDate1)]

Perform Find

Posted

We were waiting for you to point the way, of course!

BTW, I don't believe GetAsText() is required. And I use global date fields. In this way, FM will validate that the date is correct when Users type into the globals. Your finds will then more consistently produce the desired results.

You may also want to test that both fields contain a date. You would change the script to:

If [ gStart and gEnd ]

Enter Find Mode [ ]

Set Field [ CreationDate ; gStart & "..." & gEnd ]

Perform Find [ ]

Else

Show Custom Dialog [ Message: "OK" ; "You didn't enter both dates. Try again." ]

Exit Script

End If

This topic is 7026 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.