How to change the default value for filters (List-views)

Hi everyone,

I just had a problem with the default value for filters in list-view:
Currently, if open the customer list:

It will tell me “No customer found”, then I if I delete the “All territories” in the filter, I can get every customer in the List-view.

Would like to have a hint on how to set the default value “” for the territories filter.

Thank you in advance!

1 Like

hello,
Navigate to Customize form -->Customer Doctype
go to territory field and make sure that in permissions section on the right side “Remember last selected value” is not ticked. Not sure if it’s going to solve your problem because i don’t know if you choose another filter from territory, if it will show the last selected value that you chose, if that’s the case then should be solved.

Hello, thank you for your reply.

I checked it is not ticked. And I also tried to tick it and then put an empty value in the filter for it to be saved, but didn’t work either.

This is the only case i know till now where the filter can remember the value , did you try to clear cache ?
by clicking on your user and reload? or from your browser Ctrl shift R (Reload page, overriding cache)
or try to clear your browser history , just saying it might not be the issue though, just to see if it might solve it.
or also Did you check if there is any default values in the standard filter search for field territory ?

How do you check the top filter, I felt it is in somewhere from a python scripts.

I can check the bottom filter which the tick “remeber last selected value” can affect with.

It’s in /apps/erpnext/erpnext/selling/doctype/customer/customer_list.js file:
which is below:

I felt the top filter is somehow related to a report-view that I have worked for a custom report. But I couldn’t found it.

Go to Selling Settings . There you will find default customer group and default territory .
Rewrite them according to your need and save it .
Then Go to customer page and reload it .

2 Likes

Thank you for your reply!

I couldnt make it blank. The All Customer Groups or All Territories will not work if it is parent node.

I really don’t know whose idea was it to set default DocType names to filer fields such as currency. This way every time time I get From TRY To TRY as the default search on the Currency Exchange list filter fields not to mention several others.
Possibly when sb.pushed their customizations, they forgot to remove their personal settings.

1 Like

Did you solve the Currency Exchange list problem? its very annoying, what can I do I’ve tried to solve it but I couldn’t PLEASE let me know if you have solve it.

Hi afarran3,

Sorry as I am not using the ‘Currency Exchange’ doctype, but I do see there is default value set when I browser ‘Currence Exchange List’. I believe in the ‘Setting’ Modules or some other modules which you can set your default currency.

Another suggestion would be to post it to the erpnext Github repo as Issue, I think someone there might be able to help you out. Please attached the links if you do so.

I’m sorry that’s all I know. Keep searching, I think you can find it.:smile:

Hi AOL,

Thank you for reply, I’ve Issued it in GitHub I hop that I get a fast respons.

Sincerely,

Ahmed Al-Farran

[aalfarran@open-alt.com]

[+967 770040065]

No problem, could you please post the Github Issue link here so that if others having the same issue or trying to resolve will have a reference here (also post this form link in the Github issue for double-reference).

Thanks.

If this is why we get the default Item Group set every time we look at the Item list, then it is indeed deeply annoying and stupid.

Reported here

FYI a search like this Issues · frappe/erpnext · GitHub

lands these community effort examples to relate inform and promote the ‘general’ filter problem

1 Like

Is there a way as an Administrator (with no knowledge on custom scripts or codes) to make and set a default filters for each role? or can we include a field option on the custom field view to put a default filter value; this is some how same as the conditional fields or depends on fields or the default field but will be the default filter. This will really help everyone, I think.

Also, some users are not that techie or oriented with the use of a system. it will help if we could make a default filter for dates already for all doctype list or reports? especially the “created on” date? since it is not available on the fields of the doctype that you can include it on the filter.