SOLVED: Set_query multiple filters

Hi,
just a quick question:
I want to perform a logical OR in the beloow filter, for example item_group = Group4 OR item_group= Group8, showing only Group4 and Group8 categories. What’s the correct syntax? The comma separation performs logical AND

cur_frm.set_query(“item”, function () {
return {
“filters”: [{
“item_group”: “Group4”
}]
};
});

Thanks

cur_frm.set_query("item", function () {
return {
"filters": {
"item_group": ["in", ("group8", "group4")] 
}
};
});
1 Like

Thank you @saurabh6790,

strangely your solution shows me only the second part. That is, in your piece of code shows only Group4 and if I put the group4 first and group8 second, it shows only group8 !!!

@emakis sorry, my bad, please use [ instead of (

cur_frm.set_query("item", function () {
   return {
      "filters": {
           "item_group": ["in", ["group8", "group4"]] 
       }
    };
});
4 Likes

That worked! Thank you @saurabh6790!