I am trying to create an initial filter on Product Templates based on if the active_status is Active, but so far neither the operators $in or $contains are not working. The active_status field is a dropdown. When I go to select a product template, my filter is popping up but the operator is blank when using both $in and $contains.
Here is the filter.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
$viewdefs['ProductTemplates']['base']['filter']['basic']['filters'][] = array(
'id' => 'filterProductTemplatesByAccountSideCode',
'name' => 'LBL_FILTER_PRODUCT_TEMPLATES_BY_ACCOUNT_SIDE_CODE',
'filter_definition' => array(
array(
'active_status' => array(
'$in' => array(),
),
),
array(
'rtp_side_code_c' => ''
),
),
'editable' => true,
'is_template' => true,
);
Here is the usage.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
array (
'name' => 'producttemplates_rtpol_olp_1_name',
'label' => 'LBL_PRODUCTTEMPLATES_RTPOL_OLP_1_NAME_FIELD_TITLE',
//the name of the filter template
'initial_filter' => 'filterProductTemplatesByAccountSideCode',
//the display label for users
'initial_filter_label' => 'LBL_FILTER_PRODUCT_TEMPLATES_BY_ACCOUNT_SIDE_CODE',
//the hardcoded filters to pass to the templates filter definition
'filter_populate' => array(
'active_status' => array('Active')
),
//the dynamic filters to pass to the templates filter definition
//please note the index of the array will be for the field the data is being pulled from
'filter_relate' => array(
//'field_to_pull_data_from' => 'field_to_populate_data_to'
'rtp_side_code_c' => 'rtp_side_code_c',
)
),
Any help would be apprciated.