Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: UnifiedSearch wildcard

  1. #1
    brob is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    21

    Default UnifiedSearch wildcard

    Hi does anyone know how to change the unified search file (modules/home/unifiedsearch.php) which appears on all pages as the general search field.

    I need this to automatically add the % search variable

    cheers in advance

  2. #2
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: UnifiedSearch wildcard

    Haven't you seen how the search is being arranged now? There are calls to modules' functions.
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  3. #3
    brob is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    21

    Default Re: UnifiedSearch wildcard

    Hi,

    Yeah I've been into the modules and added the % but that doesnt seem to work. Any other ideas?

  4. #4
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: UnifiedSearch wildcard

    Can you list here the result queries? (i mean queries itself, not the result of the query)
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  5. #5
    brob is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    21

    Default Re: UnifiedSearch wildcard

    this is a line from the accounts ListView module

    PHP Code:
        if(isset($name) && $name != ""array_push($where_clauses"accounts.name like '%".PearDatabase::quote($name)."%'"); 
    so to search for the accounts name, if i were to search for amazing it would return two different companies i.e. 'amazing company' and 'the amazing future'

    at present it wont return 'the amazing future' only 'amazing company'

  6. #6
    Superman's Avatar
    Superman is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Kazakhstan
    Posts
    852

    Default Re: UnifiedSearch wildcard

    Can you provide here such a string (query):
    SELECT ....;
    Farkhad Rakhimzhanov
    E-mail: farkhad@gmail.com
    Skype: rakikama

    SuperTimesheet and Invoicing — timesheet tool with invoicing for SugarCRM.
    Book time against Cases, Project Tasks and Projects.
    Create invoice regarding booked time, print it in PDF or HTML,
    customize template as you like.

  7. #7
    westowl is offline Member
    Join Date
    Oct 2006
    Posts
    8

    Default Re: UnifiedSearch wildcard

    not sure if this is the answer you're looking for, but in UnifiedSearchAdvanced.php, look for

    $clause .= "LIKE '{$_REQUEST['query_string']}%'";

    add % before {$_REQUEST

  8. #8
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: UnifiedSearch wildcard

    how about searching more than 1 string like any search engine. For instance strings such as

    technology solution

    provides all records that has both strings appearing in the record...

  9. #9
    tomkerswill is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    58

    Default Re: UnifiedSearch wildcard

    I would also like to see what sugarcare mentioned in the post above. A simple example is - I have a lead called "Chris Middleton"

    Searching for "Chris Middleton" brings up nothing - because first_name=Chris and last_name=Middleton. Need to search both fields at once really!

    Tom

  10. #10
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: UnifiedSearch wildcard

    Hi

    I didn't test it yet but maybe the change provided by ivangool in this post helps.
    Cheers Pascal
    Simplicity GmbH

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

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
  •