Filtering With OR of Multiple Parameters

I see in the connector protocol ( … ol_details) that I can provide fields to filter the data on. However, it seems that if multiple fields are provided the AND operator is used on them. Is there a way to use the OR operator?



projects.php log output

				owner.initials as new_owner,
				delegate1.initials as new_delegate1,
				delegate2.initials as new_delegate2,
				delegate3.initials as new_delegate3 FROM projects 
             		LEFT JOIN people as owner ON
             		LEFT JOIN people as delegate1 ON
             		LEFT JOIN people as delegate2 ON
             		LEFT JOIN people as delegate3 ON WHERE `fk_owner` LIKE '%2%' AND `fk_delegate1` LIKE '%2%'

Thank you,

There is no such possibility for default connector.
But you can use server side event handler to customize behavior, you can define beforeFilter handler from which you can add your own filtering sql, using parameters from the url

It is not as flexible as default AND logic, because you will need to predefine set of fields, and use them in all requests.

If necessary I can provide a sample.

Hello Stanislav,
Thank you for offering to help. I followed your direction and created a custom filter. I used the example found in the connector filtering documentation ( … :filtering) and created a simple custom filter in my PHP file. It seems to work fine.


function myFilter($filter_by){
          if (!sizeof($filter_by->rules)) 
         //change WHERE some_field LIKE '%value%' to the WHERE some_field > 'value'
          $index = $filter_by->index("fk_who");
          if ($index!==false)  //there is client side input for the filter


Hi, there is any example? of how to use OR instead of default AND with the filtering of multiple parameters.


Unfortunately there is no ready to use example.