Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Column Filter
Re: Column Filter [message #2435 is a reply to message #2434] Wed, 03 February 2010 18:39 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2352
Registered: April 2006
Location: Surrey, UK
Senior Member
Attached is a screen shot of a task I have written wich sounds like it does something close to what you describe. It has an outer (top) and an inner (bottom) entity, and the top entity is used to specify the search criteria which is passed to the bottom entity when the SUBMIT button is pressed.

In order to have a SUBMIT button it uses the MULTI4 pattern instead of the LIST2. The top entity is a dummy entity in that it does not retrieve or update anything in the database. This is achieved by:

(a) this code in the _cm_pre_getData() method
$this->skip_getdata = TRUE;

(b) this code in the _cm_pre_updateRecord() method
if (empty($this->errors)) {
    // there is nothing to update
    $rowdata = array();
} // if

The complete contents of the top entity will be made available in the $fieldarray argument of the _cm_pre_getData() method of the bottom entity. This will allow you to use that information to construct the sql statement before any data is retrieved. You will also need to return an empty array from the _cm_pre_updateRecord() method of the bottom entity so that no database update takes place.

Try it out and see how you get on.
  • Attachment: multi4.png
    (Size: 17.09KB, Downloaded 1097 times)


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Formatting in _cm_listView_header() method
Next Topic: check box
Goto Forum:
  


Current Time: Wed Jul 17 09:32:36 EDT 2024

Total time taken to generate the page: 0.00865 seconds