Mark Turner Posted January 11, 2012 Posted January 11, 2012 Using FM Pro 6. Is there a way to perform a find that returns all records where the contents of several fields are the same? My attempt using a calculation field with an IF statement did not work as expected. Here's the calculation: If( (PublicationLatin = OR_WA_Plants::ScientificName = FNA Name = Hitchcock Name = Jepson Name = Oregon Flora Name = WA Checklist Name = CalFlora Name = e_Flora BC Name), "match", "variance") I should get "match" in my calc field (result set to text) when all the referenced fields are the same, "variance" when they're different. Those words show up, but when I page through my found records it's obvious that something isn't working. I get "variance" when the text is the same. I also get "match" when the fields are not the same (some are blank in some records). Thank you, -- Mark Turner
doughemi Posted January 11, 2012 Posted January 11, 2012 Try: If( (PublicationLatin = OR_WA_Plants::ScientificName and OR_WA_Plants::ScientificName = FNA Name and FNA Name = Hitchcock Name and Hitchcock Name = Jepson Name and Jepson Name = Oregon Flora Name and Oregon Flora Name = WA Checklist Name and WA Checklist Name = CalFlora Name and CalFlora Name = e_Flora BC Name, "match", "variance") The line breaks are just there to make it easier to read; they have no meaning to, and are ignored by, Filemaker.
Mark Turner Posted January 11, 2012 Author Posted January 11, 2012 Thanks, Doug. I tried pasting your version in and got the error message "There are too many separators in this function." Then I noticed a missing ) after the last field, put it in, and it works as expected. Now a search in the calculation field for "match" returns all records where the names are the same and a search for "variance" returns those with a difference.
Recommended Posts
This topic is 5036 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