About creating a filter on list page opening

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mavel
User
Posts: 88

About creating a filter on list page opening

Post by mavel »

Hi,

in the sidebar menu item i create a filter like this:
(to filter records on page opening)

function Page_Load() {

     if(empty($_GET)){
        
         header("location: purchaseslist?x_Status=1&y_Status=5&z_Status=BETWEEN&cmd=search");
         return false;
     }
}

How can I add the filter using server events without adding it to the menu with this method?
When I filter with the Recordset_Selecting server event, I cannot clear the filter to show all records.
What I want to do is to create a filter on the list page opening and to be able to show all records when I click show all from the search tools.


mobhar
User
Posts: 11703

Post by mobhar »

mavel wrote:

to create a filter on the list page opening and to be able to show all records when I click show all from the search tools.

You cannot do that. When you have already defined your own filter in Recordset_Selecting server event, then the recordset that returned from that event will always be used as initial recordset in your List page.


mavel
User
Posts: 88

Post by mavel »

But I can't temporarily create a filter on this server event. The filtered data is being filtered permanently and the show all records option doesn't work. I have over 1000 data records and I don't want to show completed jobs on list page opening. The application needs a server event where we can create temporary filters. My method is not a healthy method.


mobhar
User
Posts: 11703

Post by mobhar »

mavel wrote:

The filtered data is being filtered permanently and the show all records option doesn't work.

That's the Recorset_Selecting server event made for. You cannot display all records after doing filter in Recordset_Selecting server event.


Post Reply