Set Route options filter with conditions

HI,

How to pass filter with conditions like =,!=,>,< etc in frappe.set_route ???

Now I’m using the below code and getting report,

frappe.route_options = {“docstatus”:“1”,“employee”:frm.doc.employee};
frappe.set_route(“Report”, “Employee Advance”);

But, I need to pass route_options like
frappe.route_options = {[“Employee Advance”,“doctstatus”,"=",“1”],[“Employee Advance”,“posting_date”,">=",“2019-03-01”]};

Is this possible?
If so, how?

Hi @Uyya_Vaijeyanthi_Bal, try something like this

10

But remember change the fields.

Dear @Thiago_Henry,

I have tried the same script and got the expected output.

Now my clarification is, Is there any way to set route_options like

[“Doctype”, “email_group”, "!= ",frm.doc.name ]

Well in this case I guess that the best way for you is change your filter on the report. On the query of your report, set not equal to that field I think that will has the same effect. But if it’s not a report try this:
{“field”:[“not like”, “%” + frm.doc.name + “%”]} or not equal instead not like

1 Like

Thanks @Thiago_Henry, its working…