Having an issue implementing Default Filters on a table, wondering if someone who has done it could look over my process and see if they could spot any issues?
Following tutorial here - http://bigprof.com/appgini/tips-and-tut ... ult-filter
The column I wish to filter on is column number 28 in my table;
It's a lookup column to another table - so while the text displays "RESTRICT" in the front-end, the database value for the row I'm using to test has the integer 4 in this column.
I've edited the hook for my table name;
Code: Select all
function ContentItem_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 ContentItem
table where the value of the 28th field - mark for review - is not equal to '4' which is a lookup to the RESTRICT value.
*/
addFilter(1, 'and', 28, 'not-equal-to', 4);
}
return TRUE;
}
Any ideas?
Thanks!