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

Thread: Searching for unchecked checkbox.

  1. #1
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Searching for unchecked checkbox.

    Hello,
    I am having a strange issue. I created a custom field of type "Checkbox" and added it to the opportunities module. I also added the field to the "advanced search" layout. On the search layout the checkbox is represented by a drop down with three values "Yes", "No", and a blank line. If I select Yes, the search returns all the records where the checkbox is checked. However, if I select "No", the search returns ALL records (not just the ones that are unchecked).
    Am I missing something???
    (Sugar CE Version 5.1.0 (Build 4732) )

    Thank you.

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: Searching for unchecked checkbox.

    Hi
    The check box value will be saved as 1 and 0. So you should be create search drop down like this
    Code:
    Value   display
    0	No
    1	Yes
    And customize the search query. Then only you will get correct result

  3. #3
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Re: Searching for unchecked checkbox.

    Thank you for your reply.
    I did not create the actual Dropdown, it is created automatically I guess. I also went into studio and changed the 'checkbox_dom' from "1-Yes, 2-No" to "1-Yes, 0-No".
    But I am still facing the same problem. Is there something else I need to change? How do I customize the search query?
    On the side-note, is this normal behaviour (bug) ir am I doing something wrong?
    Thank you.

  4. #4
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Searching for unchecked checkbox.

    Hi,

    This is interesting

    I have create a custom checkbox for Accounts, I added it to teh advanced search and it appears as a checkbox, like (my items only) - so I check it to search for all Accounts that have it checked. but when it is unchecked it shows all Accounts.

    I will be interested to see how this is resoved...

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  5. #5
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Re: Searching for unchecked checkbox.

    If it appears as a checkbox in search, then I guess it sort of makes sense that when unchecked it would show all records (since there is no "middle" or "grayed out" state available for the checkbox).
    I do have "Enhanced Search" installed, and I am guessing that is the reason I get the dropdown and not just a checkbox.
    However, as I mentioned earlier, I edited the checkbox_dom to 0 and 1, instead of 1 and 2. However, I am still not able to search for records that do not have the checkbox checked only.
    Anyone else has any ideas?

    Thank you.

  6. #6
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: Searching for unchecked checkbox.

    There is a story behind as far as I know. In erlier days a checkbox was a checkbox - even on the search panel. That had indeed the side effect that one could search for positive values (checkbox checked) but not for negative ones (unchecked). At this time we recommended NOT to use checkboxes at all.

    For the past couple of versions (I do not know from when) the checkboxes (even existing ones) were converted automatically to dropdowns in the search. Since that time a search for negative values (0 = No) was possible.

    I just checked it with my live version and it works (positive and negative) for old, original fields (do not call) as well as for new, customized ones (e.g. address checked).
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

  7. #7
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Re: Searching for unchecked checkbox.

    What version do you have? II am running (Suga CE Version 5.1.0 (Build 4732). I have the drop down in the search form, but when I try the search for "NO" I get all the records. Did you have to change anything to get the search to work?

    Thank you.

  8. #8
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: Searching for unchecked checkbox.

    5.2d and no mods in this area
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

  9. #9
    kenshiro is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    Macerata - ITALY
    Posts
    421

    Default Re: Searching for unchecked checkbox.

    Quote Originally Posted by mrmmm View Post
    If it appears as a checkbox in search, then I guess it sort of makes sense that when unchecked it would show all records (since there is no "middle" or "grayed out" state available for the checkbox).
    I do have "Enhanced Search" installed, and I am guessing that is the reason I get the dropdown and not just a checkbox.
    However, as I mentioned earlier, I edited the checkbox_dom to 0 and 1, instead of 1 and 2. However, I am still not able to search for records that do not have the checkbox checked only.
    Anyone else has any ideas?

    Thank you.
    Which Enhanced Search version are you running ?

  10. #10
    mrmmm is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    71

    Default Re: Searching for unchecked checkbox.

    2.2 demo
    Thank you.

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)

Similar Threads

  1. Checkbox can´t be unchecked on custom module...
    By jasv in forum Developer Help
    Replies: 2
    Last Post: 2009-02-11, 11:50 AM
  2. Replies: 1
    Last Post: 2008-12-18, 02:49 PM
  3. Reminder Checkbox
    By mycrmspaceclemens in forum Feature Requests
    Replies: 0
    Last Post: 2007-02-22, 08:36 PM
  4. Help::CheckBox
    By garfield in forum Help
    Replies: 0
    Last Post: 2005-04-26, 04:46 AM
  5. checkbox
    By florent in forum Help
    Replies: 7
    Last Post: 2005-03-11, 05:49 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
  •