This topic is locked

Apply a default filter to list view

1/31/2021 11:37:38 AM
PHPRunner General questions
C
chandoshi authorDevClub member

I have a list of filters in my filter panel. Is there a way to use one of this as my default filter by coding this in List Page "Before Display" ?

Sergey Kornilov admin 2/2/2021

Could you explain how this "default filter" should work?
With the regular search, you can use Search API to apply an initial search filter:

https://xlinesoft.com/phprunner/docs/search-api-searchstarted.htm

Maybe it can help in your case as well.

S
Steve Seymour 2/5/2021



I have a list of filters in my filter panel. Is there a way to use one of this as my default filter by coding this in List Page "Before Display" ?


I had a similar requirement. ie. the fist view of a list page applied a filter.

In the end, I used where tabs to show the data.
example, I had a list of jobs. I used to color the row once they were invoiced. There was a filter to show non-invoiced/ invoiced.

Now I split the data with Where Tabs.
Steve.

C
chandoshi authorDevClub member 2/5/2021

Thanks, tab would be a good alternative. I will try that

C
chandoshi authorDevClub member 2/5/2021



Could you explain how this "default filter" should work?
With the regular search, you can use Search API to apply an initial search filter:

https://xlinesoft.com/phprunner/docs/search-api-searchstarted.htm

Maybe it can help in your case as well.


I have task list with time filters on left menu column. e.g. Today, Yesterday, Last Week ...

I want to have today selected when user open this list as default. I also want to indicate to the user that Today filter is selected.

Is there a way to perform following for filter buttons

// imitate the button click

pageObj.getItemButton('custom_button').click();