hello
how to filter a table before it is displayed?
being French, I can not begin to understand.
I have a code_structure field.
this field is blank with some recordings.
how to filter to display only non-empty?
Filter before
Re: Filter before
no response ?
merci !
merci !
Re: Filter before
Hi pasbonte,
Have you look into this tutorial:
http://bigprof.com/appgini/tips-and-tut ... ult-filter
Your code in the hook folder yourtablename.php should look something like below:
**replace yourtablename with the actual table name.
Have you look into this tutorial:
http://bigprof.com/appgini/tips-and-tut ... ult-filter
Your code in the hook folder yourtablename.php should look something like below:
Code: Select all
function yourtablename_init(&$options, $memberInfo, &$args){
/* Apply a default filter only if no filter is already applied by the user */
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1]){
/*
In the call below, we want to display records of the yourtablename
table where the value of the code_structure field (assuming is the 7th field) field is not empty.
*/
addFilter(1, 'and', 7, 'isNotEmpty', '');
}
return TRUE;
}
Re: Filter before
Thank you very much. This works great!