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

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

Recommended Posts

Posted

I am trying to do finds where field1 contains "x" and field2 does not contain the value "y" but I can't figure out how to make it work on FM5.5, Mac OS X. I can't use the omit function because I am doing multiple find requests and for other requests, it is okay if field 2 contains "y". Is it possible to do this in filemaker??

Posted

Hi:

I suggest making a calc field and finding on that. Like this:

Case or If((field1 = "x") and (field2 < > "y"), 1, 0)

Then in your multiple request find, search this calc field for "1"

Although I don't know that you would still get the result you are looking for, because the logic doesn't make much sense to me. Why would y not be allowed in one request and then be allowed in another? You would still get records with y in them.

Ken

Posted

I think it's like this: find all records with field1 = "x" and not field2 = "y" OR field1 = "z" and field2 = anything, etc. You may be able to manipulate the order of requests to make it work for you, but there isn't enough information provided to determine.

If Ken's calc works, you can shorten it by just using field1 = "x" and not field2 = "y", through the magic of booleans. No Case() or If() is necessary.

Posted

If you prefer not to create an aux field than you'll need to split "not equal" request into:

Request1: (field1) ="x" (field2) <"y"

Request2: (field1) ="x" (field2) >"y"

This will work for any data type but it requires exact match and it won't work for multiline or field containing in the same record other values than "y" (for ex "y x")

The other approach that will work in any case is:

Request1: (field1) ="x"

Request2: (field2) ="y" //with omit

other requests

Be aware that the order of requests is significant when some of them have omit option enabled.

Dj

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