AnsweredAssumed Answered

Error: $in requires an array

Question asked by Janin Dancause on May 23, 2018
Latest reply on May 24, 2018 by Venkatesh Prabhu

I have implemented a custom filter into a module to filter record from a custom module. Everything seem correct if I look into the sugar filter. The Filter is working correctly but I receive this error when I try it. It's for the version 7.11 ondemande.

 

record.php

5 =>
array (
'name' => 'polices_c',
'studio' => 'visible',
'label' => 'LBL_POLICES',
'initial_filter' => 'po_polices_filter',
'initial_filter_label' => 'LBL_FILTER_Polices',
'filter_relate' =>
array (
'parent_id' => 'po_polices_contacts_name',
),
),

 en_us.po_polices_filter.php

<?php

$mod_strings['LBL_FILTER_POLICES'] = 'Polices';

po_polices_filter.php

 

<?php

$viewdefs['PO_Polices']['base']['filter']['basic']['filters'][] = array(
'id' => 'po_polices_filter',
'name' => 'LBL_FILTER_POLICES',
'filter_definition' => array(
array(
'po_polices_contacts_name' => array(
'$contains' => array(),
),
),
),
'editable' => false,
'is_template' => false,
);

Outcomes