Results 1 to 6 of 6

Thread: searching on tick boxes

  1. #1
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Question searching on tick boxes

    We have a tickbox for customers that want to receive a newsletter. In the advance search we added the tickbox and it works great if we want to find customers that want a newsletter (box is ticked), but it we want to see only customers that don't want a newsletter (unticked), we get all customers (ticked and unticked).

    Is there a way to show only records where the tickbox has NOT been selected?


    Thanks
    Chad (beuten)
    DAXTEN
    www.daxten.com

  2. #2
    pblag's Avatar
    pblag is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Ukraine (Chernivtsy)
    Posts
    347

    Smile Re: searching on tick boxes

    Hi!

    I think that you need small customization. But it should be developed for you.
    Please let me know if you are interested, we can develop it for you.
    Petro Blagodir
    petro@blagodir.ua
    http://www.blagodir.com
    Blagodir Ltd.( SugarCRM - Consultations, Development and Support)

  3. #3
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Default Re: searching on tick boxes

    Quote Originally Posted by pblag
    I think that you need small customization. But it should be developed for you.
    Please let me know if you are interested, we can develop it for you.
    Thanks for your offer, but we use someone locally if the community cannot help us directly.
    Anyone else have any ideas?
    Chad (beuten)
    DAXTEN
    www.daxten.com

  4. #4
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: searching on tick boxes

    That's a good one. You'd need to run an SQL query or apply some type of modification to the search components.
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  5. #5
    michaelest is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    37

    Default Re: searching on tick boxes

    Here's a temporary solution (or maybe semi-permanent)...

    Scenario:
    You want to search on a TickBox - or Check Box - . You want to get results based on whether or not the record has one of the boxes checked or not. Problem is that if you leave the box unchecked, the search returns ALL records.

    Temporary Solution:
    1. Open up the SearchForm.html file in the /sugarCRM/modules/MODULENAME folder.
    2. Find the HTML code that draws the checkbox. It will look something like this:
    Code:
    <input name='db_fieldname' class="checkbox" type="checkbox" tabindex='1' {DB_FIELDNAME}>
    3. REMOVE the class modifier and CHANGE the type to "text", so that it resembles something like this:
    Code:
    <input name='db_fieldname'  type="text" tabindex='1' {DB_FIELDNAME}>
    4. Upload the modified SearchForm.html to the appropriate directory on your server.
    5. When you go to do your search, what was once a 'TickBox', or Check Box, is now a text area.
    6. Enter the word 'off' to search for unchecked (or 'unTicked') records, enter the word 'on' to search for checked (or 'Ticked') records.

    Note, I don't know if it's 'off' and 'on' for non-english versions of sugarCRM, so...
    -If you export your data to a .csv file with a header row, you will see what words are used in your TickBox column.

    Good luck.
    Last edited by michaelest; 2007-05-08 at 07:30 AM. Reason: clarity

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

    Default Re: searching on tick boxes

    Hi,

    looks like a pretty cool solution to me. The important thing is that you do not change anything in the db but just the display type of one field.
    I usually create drop downs for such puposes but of course those are not standard fields as they are used in the program logic for e.g. opt-out.

    Thanks!
    rl
    __________________________
    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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. dropdowns display as multi-select boxes
    By gerald29 in forum Help
    Replies: 12
    Last Post: 2007-05-01, 09:06 AM
  2. Replies: 0
    Last Post: 2007-02-10, 09:35 PM
  3. Charts come up as black boxes
    By mhasan in forum Help
    Replies: 3
    Last Post: 2007-02-01, 03:42 PM
  4. Users - Bug: Searching shows wrong results
    By malcolmh in forum Help
    Replies: 0
    Last Post: 2006-09-11, 09:41 AM
  5. Add few text boxes and list boxes in SugarCRM
    By suruchi in forum Developer Help
    Replies: 1
    Last Post: 2005-11-04, 03:55 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
  •