Results 1 to 7 of 7

Thread: Advanced Search bug.

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

    Default Advanced Search bug.

    I have a whole bunch of custom field dropdowns for the Accounts module that I want to be able to search by. When I customized the Search form view in Studio, I was able to add them all, but for whatever reason a few of the dropdowns on the Search form are defaulting to values (and interestingly enough, not the default values, but random ones) and as a result are ruining the Advanced Search capability. (Literally after every search, you need to unselect the particular value for around six dropdowns.)

    Does anyone know what's causing this, and if so, how to fix it? Ideally I would like the Advanced Search to not consider any fields but those which have been manipulated (like basic search, where if I leave the address blank it doesn't look for records that don't have an address, but instead doesn't consider the address in the search.) Is this possible when you're searching by dropdown? Any help would be hugely appreciated.

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

    Default Re: Advanced Search bug.

    A little more explanation, after having messed with it a bit more:

    All of the dropdowns have a --NONE-- field available, I assume to offer to exclude the field from search criteria. The six fields I am having trouble with have --NONE-- AND another value selected by default, rather than just --NONE--. The value selected is always the bottom-most visible value in the dropdown select box. (Which, on SearchView, resembles a multiple select field.) No matter what I've tried--repairing custom fields, editing dropdowns, etc., nothing has changed this behavior in the fields in question. I would really prefer to not have to create new custom fields using the existing dropdowns, as it would require significant modifying of existing custom code. Does anyone know what causes this sort of phenomenon in custom dropdowns on the searchview page? Is there some code I can identify and repair so that these six dropdowns behave like the other 20+ ones?

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Advanced Search bug.

    I had the same problem with a dropdown defined like this:

    PHP Code:
    $app_list_strings['mydropdown']=array (
      
    '0' => '0 %',
      
    '20' => '20 %',
      
    '40' => '40 %',
      
    '60' => '60 %',
      
    '80' => '80 %',
      
    '100' => '100 %',
    ); 
    By changing the dropdown to the following (all database values starting with "0" and having 4 digits) the problem was solved.

    PHP Code:
    $app_list_strings['mydropdown']=array (
      
    '0000' => '0 %',
      
    '0020' => '20 %',
      
    '0040' => '40 %',
      
    '0060' => '60 %',
      
    '0080' => '80 %',
      
    '0100' => '100 %',
    ); 
    You'll get some curious effect if the database values on the left side have only 3 digits, "100" starting with a "1". :-)

    goog luck!
    hk

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

    Default Re: Advanced Search bug.

    Thank you; that did the trick.

    It actually needed to be done for all values for some of the dropdowns, but once I changed the database values for those in question, they stopped pre-selecting certain values during a search.

  5. #5
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Advanced Search bug.

    Has there been a bug entered for this?

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Advanced Search bug.

    I opened it as Bug Number: 17016

  7. #7
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Advanced Search bug.

    Excellent. Thanks.

    And good find.

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Advanced Search bug?
    By jspriehl in forum Help
    Replies: 0
    Last Post: 2006-11-06, 06:24 AM
  2. Advanced Bug Search broken in OS 4.0
    By andreasw in forum Help
    Replies: 3
    Last Post: 2006-06-22, 01:27 PM
  3. BUG In Search/Edit Layout???
    By tj@estreet.com in forum Help
    Replies: 13
    Last Post: 2006-06-10, 05:43 AM
  4. BUG: Leads Advanced Search with checkbox
    By bugtracer in forum Developer Help
    Replies: 1
    Last Post: 2005-09-30, 01:53 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
  •