All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
  Print view

How to remove AddFilterCondn on clicking Search Button
Author Message
PostPosted: Tue May 15, 2018 4:15 am 
Regular
User avatar
Offline

Joined: Thu Aug 25, 2011 9:31 pm
Posts: 311
Location: Mumbai, India
How to remove AddFilterCondn on clicking Search Button

I m talking about all-rows screen ie admin only. A single-table standard node has millions of rows (mysql). After every add/edit Save .... control comes to all-rows and corr node qry executed which is becoming slow due to m2o and some atkexpression. So to make it faster in constructor i have put an addfilter like below bcoz generally users need to llok for current financial year (apr-mar). And this works great/faster.

Code:
  $this->addfilter("pl.pl_date>='2018-04-01'"); //SELECT * FROM  pl WHERE pl_date >= '2017-04-01' -- 17899


But occassionally user needs to access old data ie pl.pl_date < '2018-04-01' .... by enetering in the allrows screen search boxes and of course it does NOT show.

How do i removefilter "pl.pl_date>='2018-04-01'" when in search. That is when user clicks on Search --- it shud not have this filter and search thru all rows.

Note that clicking Search Button executes partial html thru Java code locally ... and as per my unserstanding .... call to server is NOT given. So putting " if (search) then do NOT put filter else put the filter" logic in constructor does NOT work.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group