cancel
Showing results for 
Search instead for 
Did you mean: 

Any successfully excuted search filters using the 'in' condition with strings?

Any successfully excuted search filters using the 'in' condition with strings?

It worked if I'm using numbers:

searchCriteria[filter_groups][customer_sales_order][filters][0][field]=customer_id&searchCriteria[filter_groups][customer_sales_order][filters][0][condition_type]=in &searchCriteria[filter_groups][customer_sales_order][filters][0][value]=2,3

 

It worked if I used one of the string values:

rest/V1/orders?searchCriteria[filterGroups][upd_sales_order][filters][0][field]=updated_at&searchCriteria[filterGroups][upd_sales_order][filters][0][value]=2016-01-26&searchCriteria[filterGroups][upd_sales_order][filters][0][conditionType]=gteq&searchCriteria[filterGroups][upd_sales_order][filters][1][field]=state&searchCriteria[filterGroups][upd_sales_order][filters][1][value]=canceled&searchCriteria[filterGroups][upd_sales_order][filters][1][conditionType]=in

 

But it didn't work (return 0 rows when there are rows meet the condition) if I put them in a comma-separated list:

rest/V1/orders?searchCriteria[filterGroups][upd_sales_order][filters][0][field]=updated_at&searchCriteria[filterGroups][upd_sales_order][filters][0][value]=2016-01-26&searchCriteria[filterGroups][upd_sales_order][filters][0][conditionType]=gteq&searchCriteria[filterGroups][upd_sales_order][filters][1][field]=state&searchCriteria[filterGroups][upd_sales_order][filters][1][value]=canceled,holded&searchCriteria[filterGroups][upd_sales_order][filters][1][conditionType]=in

I also tried adding single, double quote, with and without encoding; all return 0 rows:

rest/V1/orders?searchCriteria[filterGroups][upd_sales_order][filters][0][field]=updated_at&searchCriteria[filterGroups][upd_sales_order][filters][0][value]=2016-01-26&searchCriteria[filterGroups][upd_sales_order][filters][0][conditionType]=gteq&searchCriteria[filterGroups][upd_sales_order][filters][1][field]=state&searchCriteria[filterGroups][upd_sales_order][filters][1][value]='canceled','holded'&searchCriteria[filterGroups][upd_sales_order][filters][1][conditionType]=in

searchCriteria[filterGroups][upd_sales_order][filters][0][field]=updated_at&searchCriteria[filterGroups][upd_sales_order][filters][0][value]=2016-01-26&searchCriteria[filterGroups][upd_sales_order][filters][0][conditionType]=gteq&searchCriteria[filterGroups][upd_sales_order][filters][1][field]=state&searchCriteria[filterGroups][upd_sales_order][filters][1][value]="canceled","holded"&searchCriteria[filterGroups][upd_sales_order][filters][1][conditionType]=in

searchCriteria[filterGroups][upd_sales_order][filters][0][field]=updated_at&searchCriteria[filterGroups][upd_sales_order][filters][0][value]=2016-01-26&searchCriteria[filterGroups][upd_sales_order][filters][0][conditionType]=gteq&searchCriteria[filterGroups][upd_sales_order][filters][1][field]=state&searchCriteria[filterGroups][upd_sales_order][filters][1][value]=%22canceled%22,%22holded%22&searchCriteria[filterGroups][upd_sales_order][filters][1][conditionType]=in

 

 

2 REPLIES 2

Re: Any successfully excuted search filters using the 'in' condition with strings?

I also found the issue listed on Github. It lists the issue as resolved - but I'm not sure when the update which addresses this will be released - I'd really like to know that. Smiley Happy

Re: Any successfully excuted search filters using the 'in' condition with strings?

Thanks, I'll watch that. I'm currently on 2.02, the latest GA.