I'm implementing a filter, where I need to search the records in Core Data, which have "yes" in certain columns.
Table:
Forexample,returningtheelementsthathaveyesinthecolumnsATTRIBUTE1,ATTRIBUTE3,andATTRIBUTE5
InthisexampleIwouldreturntherecords:
linha1elinha3.
ItriedusingthefollowingconfigurationwithNSPredicate:
NSPredicate*argumentosBusca=[NSPredicatepredicateWithFormat:@"atributo1 == %@&&atributo2 == %@&&atributo3 == %@&&atributo4 == %@&&atributo5 == %@",[arrayEscolhas objectAtIndex:0],[arrayEscolhas objectAtIndex:1],[arrayEscolhas objectAtIndex:2],[arrayEscolhas objectAtIndex:3],[arrayEscolhas objectAtIndex:4] ];
But this way you can only return the records when all the columns are identical to the NSPredicate
setting.