How to create Filter link in side bar?

how to create filter link for a field in a doctype in doctype list view side bar.image attached for reference

can i create link like in the image with multiple filter fields



Set In list view for a select field in a custom form to get a filter.


I already did that for a link is not working. it work only for select field ?

This is an extremely useful feature.
I’ve just tried it and it works fine if I follow the same route, as in your example (“delivery status” of “sales order”), but if I want to show “brand” field of the “item” form in the filter, nothing changes in the item list.

Edit: I’m on the official SaaS subscription,
ERPNext: v6.27.24
Frappe Framework: v6.27.23

1 Like

Hi, it works not in all doctypes, because they have different colum’s quantity. So if you can change item_list.js file add this line
colwidths: {“subject”: 3, “indicator”: 2}
it can help, also if you can remove in_list_view in other field(if this field is not necessary) it helps.

Unfortunately, it seems that the feature works not only for selected doctypes, but also for selected fields in those selected doctypes.
For instance, I turned on list view for both “customer name” and “company” fields in a “sales order” form, but none of them appeared in the “sales order” list. Tried both with v6.27.24 on the SaaS and with v7 beta self-hosted.
Can anybody confirm the same? Is it by design?

Have you tried to remove existing “in_list_view” in “grand_total” or “status”? and then add you flags?

Thank you for suggestion. Yes, I removed “delivery status”, “status” and “grand total”, but neither “customer name” nor “company” appeared.
Both on v6.27.24 and v7 beta

sorry in my case it helps.

Sorry for summoning you, @Hafees_Kazhunkil @saurabh6790, but can any of you confirm or decline the issue from your current experience, please? Thank you.

I think it works only for select field.i used js code to add new filter link for any field in side bar

refer todolist js code,it creates a new filter link assigned by me

Thank you for reply. Unfortunately this doesn’t work for us as we are on SaaS subscription.

Hello @NMyshuk

Please I need your help and I found this post that might help me:
I need to add another indicator (I need one indicator for status field and another indicator for another field in the list view) how I can achieve this?


Hello @bghayad, could you please explain with some screenshots or more details… because I cann’t understand what you want.

Thanks a lot for your kindly reply.

Kindly find below the image for more declarations:

As you see: Status field has indicators and working fine. I need to have indicators also for Order Status field, so the In Progress to be blue and Cancelled to be red and Done to be green, how?


I am not sure but I think you can try.
You need to add trip_order_list.js to the directory trip_order.
In this file please add the code

frappe.listview_settings[‘Trip Order’] = {
add_fields: [“order_status”],
get_indicator: function(doc) {
if(doc.order_status===“In Progress”) {
return [(“In Progress”), “blue”, “order_status,=,In Progress”];
} else if(doc.order_status===“Cancelled”) {
return [
(“Cancelled”), “red”, “order_status,=,Cancelled”];
} else if(doc.order_status===“Done”) {
return [__(“Done”), “green”, “order_status,=,Done”];