How to filter using multi values on custom field using XML RPC in one query?

I’ve successfully integrated with infusion and get the desired data using XmlRpc api.

Working on Contacts table
I’ve created a custom field named status
I was able to get the data filtered by one value status Successfully
but now i want to get the data filtered by multi status
Example : i need to get the contacts that have status open and contacts that have status closed in
one query .

i tried to use the IN operator by send the status as string array but it returns me no data.

please consider that i have pagination to display the contacts so i need to know the count with another call ,that’s why i need it in one call

How can i achieve that ?
Thanks in advance

I could be wrong but I don’t think the IN operator will work that way. The RPC doesn’t conform specifically to SQL like statements though IN can be used I’m not sure that would get what you want (we are talking about you using IN within the query right?). One way that might work is to create a saved search in IS with the parameters you need to filter for and then use the search object to pull information based on the parameters of the saved search.

Thanks for the answer

you are right, I’ve found that IN operator only works with Ids fields not string ones.
could you please show me an example for the solution ?
also will this solution work when i have 16 status
as you know there will be many combinations for 16 status as parameters.

So no, that wouldn’t be practical. You might want to consider using tags for status values instead. Still, that won’t solve wanting to query for multiple conditions. I’m really not quite sure, short of maintaining a backend database copy of information, how you might accomplish that.