Results 1 to 6 of 6

Thread: Is it possible to search by keyword?

  1. #1
    spectheintro is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    59

    Default Is it possible to search by keyword?

    I'm having a lot of difficulty with the Search functionality in Sugar OS 4.5.1f.

    I have an account called "The Tire Guys." I want to search for them out of around 1000 other accounts, using the Account search functionality. I put in a search for "tire" and nothing comes up. "Guys" produces a similar result. But a search for "the" pulls it up. Also, if I do a search using the general search at the top using "tire" or "guys" I get the same results. Ideally, any keyword would register in these searches, and any account/contact/etc with that keyword would pop up. That seems to be a very basic cornerstone of searching and I'm confused as to why it's not functioning. Am I doing something wrong?

  2. #2
    spectheintro is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    59

    Default Re: Is it possible to search by keyword?

    After some more digging (I did about four searches on the forums before posting my original question; I guess 5th time's a charm...) I have found a temporary solution here. However, this isn't really ideal--I don't want my users to have to remember to insert a % before every search they do. Is there any way to insert this functionality manually into SugarCRM 4.5.1f, or do I need to wait for 5.0 to get this (very basic) functionality? Thanks.

  3. #3
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Is it possible to search by keyword?

    Edit the include/SearchForm/SearchForm.php file and at around line #335 you will see this

    case 'like':
    $where .= $db_field . " like '".$field_value.$like_char."'";
    break;

    Change it to this

    case 'like':
    $where .= $db_field . " like '".$like_char.$field_value.$like_char."'";
    break;
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  4. #4
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Is it possible to search by keyword?

    Will this bug be addressed in 5.0?

  5. #5
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Is it possible to search by keyword?

    Not really a bug, just the way it works.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  6. #6
    spectheintro is offline Sugar Community Member
    Join Date
    May 2006
    Posts
    59

    Default Re: Is it possible to search by keyword?

    Thanks for the response.

    This fixed the problem for Accounts, but the top search bar (the one directly under the font size and color buttons) still functions the old way.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 2007-11-22, 01:31 PM
  2. Edit the basic Search form
    By vincentd401 in forum Developer Help
    Replies: 2
    Last Post: 2007-09-27, 10:09 AM
  3. Contacts Search Form
    By wjohnson in forum Help
    Replies: 3
    Last Post: 2006-11-15, 08:16 PM
  4. BUG In Search/Edit Layout???
    By tj@estreet.com in forum Help
    Replies: 13
    Last Post: 2006-06-10, 05:43 AM
  5. Search by Keyword
    By rexykik in forum Help
    Replies: 0
    Last Post: 2005-09-30, 07:56 PM

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
  •