How to add is_read(status) field in the filter menu option of list view in Notifications module

Hi All,

             I was trying on adding the is_read(status) field in the filte options of the notifications module

I have tried by adding the below code

path:<>/custom/modules/Notifications/clients/base/filters/default/default.php

$viewdefs['Notifications']['base']['filter']['default']['fields']['is_read']=array();

This was adding the status field in the filter menu of the list view in notifications but removing the existing options.

Can any once please help me how to go with it

Mehul  Bhandari David López Angel Magana Ramana Raju Santhana

Regards

Sidhu

Parents Reply Children
  • Hi Guys 

                    The above is workign for me but...the options are coming as true and false.

    And it is not user friendly when we say true and false instead of read and Unread

    Can any one please help how can i change true or false to read and unread in the filter dropdown option

    /custom/modules/Notifications/clients/base/filters/default/default.php

    <?php


    $module_name = 'Notifications';
    $viewdefs[$module_name]['base']['filter']['default'] = array(
    'default_filter' => 'all_records',
    'fields' => array(
    'name' => array(),
    'tag' => array(),
    'assigned_user_name' => array(),
    '$owner' => array(
    'predefined_filter' => true,
    'vname' => 'LBL_CURRENT_USER_FILTER',
    ),
    '$favorite' => array(
    'predefined_filter' => true,
    'vname' => 'LBL_FAVORITES_FILTER',
    ),
    'is_read'=>array(),//in the dropdown options i am getting true false instead of read/unread
    ),
    );

    David López Tevfik Tümer Mehul  Bhandari Bhavin Patel

    Regards

    Sidhu