Results 1 to 2 of 2

Thread: Reports filter for "does not contain"

  1. #1
    URtech is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    34

    Default Reports filter for "does not contain"

    I'm curious if anyone has a solution or workaround for creating a filter value of "does not contain" instead of only having "contains" within the Reports module filter options? Any tips or tricks on how you did this would be greatly appreciated!

    Cheers, Sean

  2. #2
    jenny is offline Sugar Team Member
    Join Date
    Jul 2006
    Posts
    25

    Default Re: Reports filter for "does not contain"

    In order to do this, you would have to do the following:

    1. In modules/Reports/templates/templates_modules_defs_js.php, search for "contains". You would add your qualifier construct here:
    e.g.
    qualifiers[qualifiers.length] = {name:'contains',value:'<?php echo $mod_strings['LBL_CONTAINS']; ?>'};
    qualifiers[qualifiers.length] = {name:'not_contains',value:'<?php echo $mod_strings['LBL_NOT_CONTAINS']; ?>'}

    This step will make sure that the filter qualifier drop down will contain the "Not Contains" value.

    2. In include/generic/SugarWidgets/SugarWidgetFieldvarchar, add a new function similar to this one:
    function queryFilterNot_Contains(&$layout_def)
    {
    return $this->_get_column_select($layout_def)." NOT LIKE '%".$GLOBALS['db']->quote($layout_def['input_name0'])."%'\n";
    }

    Delete any files named modules_def_% from \cache\modules\ and be sure to clear the browser cache before trying it out.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Advanced search "NOT" filter
    By psdavec in forum Feature Requests
    Replies: 9
    Last Post: 2008-08-01, 10:56 PM
  2. Changing "Edit" to "filter" for Dashboard and Calendar
    By nexweb in forum Feature Requests
    Replies: 1
    Last Post: 2005-10-28, 07:59 PM
  3. "Only my items" filter is not working
    By lorenzogrilli in forum Help
    Replies: 0
    Last Post: 2005-10-05, 10:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •