Hi,
I really appreciate if anyone tell me what the right way to use like operator in frappe.db.count.
I know a bit that it is used using filter but don’t know the exact syntax.
Table Name: BOM Item
Field Name Where Like Operator Need to be used is: parent
I am using the below and getting error:
@frappe.whitelist(allow_guest=True)
def find_bom(item_code,bom_code):
bom_code='BOM%'+bom_code
j=frappe.db.count("BOM Item", filters=[["BOM Item", "parent", "like", "{0}%".format(bom_code)]])
frappe.msgprint(j)