Newbies shar Posted September 29, 2011 Newbies Posted September 29, 2011 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?
comment Posted September 29, 2011 Posted September 29, 2011 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.
LaRetta Posted September 29, 2011 Posted September 29, 2011 I see it as similar to Find Matching Records. 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 shar Posted September 29, 2011 Author Newbies Posted September 29, 2011 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now