1
I am implementing a filter, where I need to search the records in Core Data, that have "yes" in certain columns.
Table:
For example, return the elements that have yes in the columns ATRIBUTO1, ATRIBUTO3 and ATTRIBUTE 5
In this example would return the records:
linha1 e linha3.
I tried using the following configuration with Nspredicate:
NSPredicate* argumentosBusca = [NSPredicate predicateWithFormat:@"atributo1 == %@&&atributo2 == %@&&atributo3 == %@&&atributo4 == %@&&atributo5 == %@",[arrayEscolhas objectAtIndex:0],[arrayEscolhas objectAtIndex:1],[arrayEscolhas objectAtIndex:2],[arrayEscolhas objectAtIndex:3],[arrayEscolhas objectAtIndex:4] ];
But this way only lets you return the records when all the columns are identical to the configuration of the NSPredicate
.
I guess I didn’t understand it right. First you said to get the arguments that go with
sim, nao, sim, nao e sim
, and it’s just the flap1 that is so. But on the other hand you said you need results with value "yes".– Paulo Rodrigues
Sorry. I’ll rephrase. I took a look, I revised a few times but it still wasn’t clear...
– Tiago Amaral