AnsweredAssumed Answered

Custom filters on list view and default result

Question asked by Muhammad Shaji Uddin on Aug 2, 2016
Latest reply on Aug 3, 2016 by Ajay Kumar

Hi All,

 

On custom module "MOD_Properties" I have below 5 custom fields

1. Project (dropdown)

2. Island (dropdown)

3. Sub Project (dropdown)

4. Hotel (dropdown)

5. Unit# (textfield)

 

I customized above 5 fields in 1 filter definition below is code and file location is (custom\Extension\modules\THOE_Properties\Ext\clients\base\filters\basic\Properties_filter.php)

 

<?php

$viewdefs['MOD_Properties']['base']['filter']['basic']['filters'][] = array(
    'id' => 'MOD_Default_Filter',
    'name' => 'Default PropertiesFilter',
    'filter_definition' => array(
        array(
            'project_c' => array(
                '$in' => array(
                    '',
                ),
            ),
        ),
        array(
            'island_c' => array(
                '$in' => array(
                    '',
                ),
            ),
        ),
        array(
            'subprojecttype_c' => array(
                '$in' => array(
                    '',
                ),
            ),
        ),
        array(
            'hotel_c' => array(
                '$in' => array(
                    '',
                ),
            ),
        ),
        array(
            'unit_c' => array(
                '$starts' => array(
                    '',
                ),
            ),
        ),
    ),
    'editable' => true,
    'is_template' => false,
);

The filter is showing with 5 fields but result is not correct even If I select value of 1st filter "Project" the result is not correct. I think it consider all 5 fields together. As default behavior of Sugar it should consider value of 1st filter "Project".

 

Any help will be highly appreciable

 

Regards

Outcomes