I’m trying to do a filter with API V8 that searches the title and description for a word and returns where its found in the title or description. So far I’ve got that, but need to add an AND that the results are only status = Published.
I’m not sure if its possible or I just don’t know the nomenclature. Here’s what I’ve got so far:
No you cannot add brackets. I’m really looking for someone who has experience with this and has tried it and can either confirm NO it’s not possible or YES, here’s how to do it.
Since it’s not possible to nest filters via the API, the logic shouldn’t work:
Is it (or(and)) or (and(or))
I’ve tried with mixing and and or and just moving filters to the front or to the rear, but the output wasn’t as expected.
Here, you might need to fallback to GraphQL, if you wan to retrieve in one request.
Thanks for trying @BastianHammer I came to the same conclusion. I tried a 100 different ways and concluded you can use AND or OR but not both. This is unfortunate because it forces me to do processing on the client side I don’t want to. However, I mostly got working what I needed to with V8.
I didn’t want to go GraphQL route because I want what I’m working on to be backwards compatible to SuiteCRM 7.
Mostly I’ve found the V8 API pretty robust, except for filtering records, being able to do more complex queries would be beneficial.
I know I can write my own endpoint, but really wanted the applicaiton I’m working on to not require any SuiteCRM code customizations.