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

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

Recommended Posts

Posted

Does anyone know how I might do this?

Frequently, I want to create a complex search in a script, such as:

"Find all records on 7/14/2003 with either status code of 7 or 8"

In SQL-speak, this is easy:

"Select * from FILEV WHERE (

((MyDate = '07-14-2003') AND ((STCODE = '7') OR (STCODE = '8')))

);"

But I can't figure out how FM's logic works on this.

Posted

Enter Find Mode

Set Field (MyDate, 7/14/2003)

Set Field (STCODE, 7)

Duplicate Request

Set Field (STCODE, 8)

Perform Find

Note that Set Field doesn't always work as expected with date fields. Sometimes you have to use Insert Calculated Result, which means you have to be on a layout with the date field on it.

Posted

When you enter the find mode, you will need to create two find requests. The first would have a date of 7/14 and a status of 7. The second request would be the same except the status would be 8. When you perform the find it will find the records meeting that criteria. For a find (aka query) that uses AND needs to have multiple find requests.

HTH, Mike

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