ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Filters is not working

bug

#1

I am trying to enter value manually form the drop down list for example - if i type number or anything in letters then drop down list does not filter according to what i typed…(i mentioned in screenshot)I am using ERPNext: v10.1.53 (master) any idea to filter


#2

i am stuck in this issue is there any idea? y it is not filtering in drop down based on what i type in the field…

TIA,
Nivedha


#3

do you add the field Batch No manually on Material Request Item ?


#4

yes Batch No is a link field in material request…here i am trying to enter the number or letters the drop down is not filtering based on what i typed in the field.


#5

hi all any idea about this case?


#6

you have to add search fields in doctype where your batch no is linked


#7

i tried what u said but still it is not filtering based on what i typed from the drop down in the field


#8

i have wrote a query for this filter based on item list of approved batches will be displayed in this ‘Batch No’ field according to filter query it is getting displayed in the drop down but from that drop down if i type number or letters it is not getting filtered…


#9

hi all still i stuck in this problem is there any possiblities to solve this ?


#10

kindly share js and py code that you have written


#11

if you are using set_query then you can use this
in py

def get_custom_query_(doctype, txt, searchfield, start, page_len, filters):

return frappe.db.sql(""" select name from tabSupplier a where a.{key} LIKE %(txt)s “”".format(key=searchfield), {
‘txt’: “%%%s%%” % frappe.db.escape(txt)})

each time you type in link field set query will be called from js so python method will get hit each time


#12

hi @AkshayJadhao thanks a lot now it is executing :grinning::+1: