I want to achieve the following:
frappe.call({
method: "frappe.client.get_value",
args: {
doctype: "Salary Structure",
fieldname: "name",
filters: {
employee: ["=", cur_frm.get_field("employee").value],
is_active: ["=", "Yes"],
from_date: ["<=", "2015-03-01"],
(to_date: [">=", "2015-03-31"] or to_date: ["=", "null"]),
},
},
callback: function(r, rt) {
if(r.message) {
console.log(r.message);
}
}
});
The problem I have is in (to_date: [">=", "2015-03-31"] or to_date: ["=", "null"]),
- Firstly, there is the brackets - is there a way to specify brackets in filters?
- there is no “IS NULL” condition - or is there?
- the OR operator, how would one specify OR in filters?