ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

'OR' for set_query


#1

I want to list all the customers who are “Regular” or “Agent”. Could someone please help me implementing ‘OR’ condition?

		cur_frm.set_query("seller",function() {
			return {
				"filters": {
					"customer_group": "Regular",
					"customer_group": "Agent" 
				}
			};
		});

#2

try this

cur_frm.set_query("seller",function() {
			return {
				"filters": {
					"customer_group": ["in", ["Regular", "Agent"]],
				}
			};
		});

#3

Thank you @saurabh6790!!!

I have another question and do you think you can help me there?