How to make filtered results BUTTON on top of doctype results?

I would like to add a pre-defined filtered BUTTON on top of doctype results like this:

And have it show me results like where doc.somestatus = true

Is there any example of this in other doctype? Easy to do?

Probably apply to list view only

Even cooler if we could figure out how to add a matched results count, but I think a lot harder than simple pre-defined filtered button:


This can be done with least effort by turning the buttton into a parametized URL redirect using (any) field name for the parameters. For example:

If you don’t want to reload the page, or if you want to use “like” queries, I’m not sure what your best options are. You can always use javascript to fill in the query boxes with text, but that may not be what you are asking for.

1 Like

Reading your question in more detail, I’m wondering why you can’t use the built-in filters? They work well with minimal training.

For example, to view documents assigned to someone, use the Assigned To filter:

To filter by a status or some other displayed field, simply click on the value you want to filter by: image

built-in column filters would seem like the obvious solution (and is a solution). In our case maybe a user want to see with a single click what work is assigned_to = $current_user_session (records that are assigned to that user).

I realize we’re only saving a couple of key strokes or clicks with a single button Vs. column-filters. Trying to make the user experience nicer from the perspecitive of the most common actions they’ll be performing. Like looking for issue tickets that are assigned to them.

Here’s an example of a similar “less clicks” challenge put out there and completed for “purchase orders” (or whatever doctype you might want to apply this to)…

We have some less computer savvy folks in the business (who are VIPs) and they don’t like to hunt for things on the UI. Even if the process isn’t for them, they may comment on how “complicated” it is if they are sitting in on an end-user training, which they occassionaly do.