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

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

Recommended Posts

  • Newbies
Posted

I have table_1 in FM & I need find some data in this table for criteria fieldA>fieldB

I write script:

:( I try related Table_1 for him self Table_2 from some ID field & corect script:


Enter Find Mode[]

Set Field[Table_1::fieldA; ">" & Table_1::fieldB]

Perform Find[]



In result this script work not good. They show data where fieldA>fieldB & fieldA<fieldB. Its not good 

Enter Find Mode[]

Set Field[Table_1::fieldA; ">" & Table_2::fieldB]

Perform Find[]

but its dont work too.

How can help me?

Posted

Filemaker does not perform calculations during a find. You need to add a calculation field, for example =

fieldA > fieldB

then search for 1 (True) in this field.

Posted

I see it as similar to Find Matching Records. :wink3:

Hi Shar,

You can always set the value of FieldB to a variable at the beginning of your script and then use the value within your find, something like this pseudo script:

Set Variable [ $fieldB ; ">" & Table::FieldB ]

Set Error Capture [ On ]

Perform Find [ Table::FieldA ; $fieldB ]

If [ not Get ( LastError ) ]

Show Custom Dialog [ "No records found." ]

... do whatever if no records found

Else

... do whatever with your found set

End If

added corrections in blue ... it's still early and before coffee. ;-)

  • Newbies
Posted

Thank you for you answer. I found out myself. I use calculation fielt & do my find for this field.

Similarly like you write comment.

.

Thanks for all!

​sorry for my great english...

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