Problem with filters
Posted: 2016-02-23 18:02
I tried to put filters and couldn't manage to setup such a logical filter :
Field 1 : creationtime ( time stamp )
Field 2 : type of organization (choices => individuals / non-profit / limited liability / corporation)
Field 3 : current state (choices => alive / stand-bye / dead)
What i want to get (in TV) with the filtering is :
All records where :
* timestamp > n or no timestamp (where n is a calculated timestamp to get only latest records since the beginning of the week )
* all types of non-profit, limited liability, corporation, regardless their current state
* no dead individuals
I tried 20 or more different filtering possibilities, it never worked because that would work is the following :
(creationtime > n OR timestamp is-empty) AND ( ( type of organization != 'individual') OR ( type of organization == 'individual' AND current state != 'dead' ) )
But what i can only get is :
(creationtime > n OR timestamp is-empty) AND ( type of organization != 'individual') OR ( type of organization == 'individual' AND current state != 'dead' )
Not the same logical skeleton, not the same result. I desperetely have to limit the possibility of my app to only very basical filtering possibilities.
Any ideas ?
(question for Ahmad) :
Should i change something in datalist.php ?(in $tvQuery, before sending it to sql) ?
Field 1 : creationtime ( time stamp )
Field 2 : type of organization (choices => individuals / non-profit / limited liability / corporation)
Field 3 : current state (choices => alive / stand-bye / dead)
What i want to get (in TV) with the filtering is :
All records where :
* timestamp > n or no timestamp (where n is a calculated timestamp to get only latest records since the beginning of the week )
* all types of non-profit, limited liability, corporation, regardless their current state
* no dead individuals
I tried 20 or more different filtering possibilities, it never worked because that would work is the following :
(creationtime > n OR timestamp is-empty) AND ( ( type of organization != 'individual') OR ( type of organization == 'individual' AND current state != 'dead' ) )
But what i can only get is :
(creationtime > n OR timestamp is-empty) AND ( type of organization != 'individual') OR ( type of organization == 'individual' AND current state != 'dead' )
Not the same logical skeleton, not the same result. I desperetely have to limit the possibility of my app to only very basical filtering possibilities.
Any ideas ?
(question for Ahmad) :
Should i change something in datalist.php ?(in $tvQuery, before sending it to sql) ?