addFilter not working, what did I do wrong?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
omackeytech
Veteran Member
Posts: 35
Joined: 2014-06-04 13:18

addFilter not working, what did I do wrong?

Post by omackeytech » 2014-06-04 14:33

I have a check box in my database table items. If the box is checked (=1) I don't want that record displayed or searchable for that matter.
It's the 8th field in the table so I used this code. When I go to the table view all I get is a blank screen.
Any suggestions?

function Items_init(&$options, $memberInfo, &$args){
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1]){
addFilter(1, 'and', 8, 'not like', '1');
}
return TRUE;
}

omackeytech
Veteran Member
Posts: 35
Joined: 2014-06-04 13:18

Re: addFilter not working, what did I do wrong?

Post by omackeytech » 2014-06-05 01:04

Ok, it is working. If I leave the page open for a while it will eventually render the results. I have no idea why it was so slow.
I found a work around. I created a view in mysql and use it. Only problem there it throws up multiple warnings when I change the check box and save it. It cannot update the primary table the view is based on.

So the hunt continues....

Post Reply