NSSearchField:Multiple Predicates

Hi Community,
I’m working with an ASOC application with a huge table of data. I want to have only one search field, and make it so that the program will search more than one column for the text entered. I figured it would be as easy as just making another predicate binding to the value of another column, but that doesn’t seem to be working. Does anyone know how I can go about this? Thanks,


You’ll need predicates for every column you want to search.

Exactly, that’s what I set up, but it was acting like I only had the predicate of one of the columns. Could you maybe explain piece by piece how to do it? I just made one predicate as per usual, and then did the same thing for the next except changing the value name. Is this wrong?

Actually, my bad – you can do it with a single predicate, using “or” between the predicate tests. There’s an example and screenshot on page 47 of my book. The predicate will be something like “someKey contains $value or otherKey contains $value”.

Beautiful, works like a charm. Thank you so much!