Multiple choices select with data module created view on my website I have a custom table, and I used the data module to create a view that uses the entries in that table.
I have created an exposed filter for one of the columns. Since I needed a select form and only search box was available, I used this code:

function mymodule_form_views_exposed_form_alter(&amp;$form, $form_state) {

$form['myfield']['#type'] = 'select';
$form['myfield']['#multiple'] = true;
$form['myfield']['#default_value'] = array("" =&gt; "All");
$form['myfield']['#options'] = $values;
$form['myfield']['#attributes'] = array('size' =&gt; 10);


}

The problem is that when I select multiple values, it performs an "AND", but I need an "OR".
How can I procede?
Thanks!
*markus_petrux* answered, and josepvalis gave a helpful example of this in Drupal Groups in 2010. 

You can use hook_views_pre_view to alter the filter to use 'OR'. Trimming josepvalis's example, try redefining the filter &amp; applying that:

function my_module_views_pre_view(&amp;$view) {
    $new_view_filters['field_multiselect_value'] = array(
        'id' =&gt; 'field_multiselect_value',
        'table' =&gt; 'my_table',
        'field' =&gt; 'my_column',
        'operator' =&gt; 'or',
        'value' =&gt; $array_of_values,
        'group' =&gt; '0',
        'exposed' =&gt; FALSE,
        'relationship' =&gt; 'none',
    );
    $view_overrides = array();
    $view_overrides['filters'] = $new_view_filters;
    foreach ($view_overrides as $option =&gt; $definition) {
        $view-&gt;display_handler-&gt;override_option($option, $definition);
    }
}