Hi,
what about following problem:
1. Initial filter set in hooks
function publikationen_init(&$options, $memberInfo, &$args){
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1]){
addFilter(1, 'and', 12, 'isEmpty');
}
return TRUE;
}
Works fine when calling table "publikationen"
2. Records of table "publikationen" are child records.
When request a child from another mother-table-dv following warning appears (but only in popup-modus, calling the childs by a link to the detail records seems to be okay):
"Warning: Missing argument 5 for addFilter(), called in /volume1/web/sites/AS_MediaCollector/hooks/publikationen.php on line 10 and defined in /volume1/web/sites/AS_MediaCollector/incCommon.php on line 412"
But nevertheless child-dv is correct.
What to do?
Thanks in advance
Koepi
Initial Filter and Warning when displaying as a child-dv
-
- AppGini Super Hero
- Posts: 85
- Joined: 2014-06-14 03:08
- Location: India
- Contact:
Re: Initial Filter and Warning when displaying as a child-dv
Hi,
Basically filter should have 5 parameters
Eg:
1. The filter index.
2. How to combine with previous filter. Accepted values: 'and', 'or'.
3. The field index. The first field in a table has an index of 1, the second 2, ... etc.
4 .The filter type (operator). Accepted values (case-sensitive):
'<=>', '!=', '>', '>=', '<', '<=', 'like', 'not like', 'isEmpty', 'isNotEmpty'
5. The filtered value.
It will definitely throw you an error if you use four parameters
I think may be the control is not going to the "If" condition in your code , so you are not getting any error in normal page view..
Basically filter should have 5 parameters
Eg:
Code: Select all
addFilter(1, 'and', 7, '<=>', 'New');
2. How to combine with previous filter. Accepted values: 'and', 'or'.
3. The field index. The first field in a table has an index of 1, the second 2, ... etc.
4 .The filter type (operator). Accepted values (case-sensitive):
'<=>', '!=', '>', '>=', '<', '<=', 'like', 'not like', 'isEmpty', 'isNotEmpty'
5. The filtered value.
It will definitely throw you an error if you use four parameters
I think may be the control is not going to the "If" condition in your code , so you are not getting any error in normal page view..
Code: Select all
function publikationen_init(&$options, $memberInfo, &$args){
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1]){
addFilter(1, 'and', 12, 'isEmpty');
}
return TRUE;
}
Re: Initial Filter and Warning when displaying as a child-dv
Thanks Uday.
But what about the fifth parameter (filtered value) when filter type is 'isEmpty' or 'isNotEmpty' ?
Please excuse me even not knowing the basics...
Koepi
But what about the fifth parameter (filtered value) when filter type is 'isEmpty' or 'isNotEmpty' ?
Please excuse me even not knowing the basics...
Koepi
-
- AppGini Super Hero
- Posts: 85
- Joined: 2014-06-14 03:08
- Location: India
- Contact:
Re: Initial Filter and Warning when displaying as a child-dv
If you want to search for an Empty String you can try the following
addFilter(1, 'and', 12, =,'');
addFilter(1, 'and', 12, =,'');