Try ERPNext Buy Support Partners Foundation

Filter is not working on return of a db values in latest version

Am using a query to list down values in a field, but am typing some related letters not working.
i tried the following but no helps Filters is not working
working idea are welcome…!!!

Can you share the code both JS and Python.

You can find a number of examples in queries.py regarding this.

@root13F this is py query - return frappe.db.sql(""“select name from tabItem i where i.{key} LIKE %(txt)s and {cond}”"".format(key=searchfield,cond=cond),{
‘txt’: “%%%s%%” % frappe.db.escape(‘txt’)})

js function:
frm.set_query(“item_code”, “items”, function() {
return {
query: “formulation.overrides.override_manufacturing_bom.item”,
filters: {‘doc’:frm.doc.item}
}
});

i want to know what does txt does in query…on using the above code am getting empty set.