Alpha DevCon 2018
Results 1 to 11 of 11

Thread: multi-select checkbox or dropdown in search part

  1. #1
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,254

    Default multi-select checkbox or dropdown in search part

    I'm trying to filter records by team, and for the sake of simplicity, let's say they're team numbers 1, 2, and 3.

    Is there any way to have a checkbox or dropdown field in the search part that will allow me to search for records containing more than one of these teams at a time? Using the checkbox option or the dropdown, even as a multi-select, seems to return records only related to the last one picked--e.g. if I select 1 and 3, it only returns records with 3.

    Surely there's a way--I'm hoping so, because I'd like to spread this functionality throughout my application. I'm working against MS SQL tables, by the way, and the checkbox/dropdown options are dynamically populated from a SQL table if any of that matters to my question.

    Thanks in advance for suggestions.

  2. #2
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,395

    Default Re: multi-select checkbox or dropdown in search part

    1,3 is what should work in a search but I think there is a bug with sql searches. Other searches like 1..4 are supposed to work as well but again not with sql currently. Sorry I have never used multi-selects on web side.
    Chad Brown

  3. #3
    Member
    Real Name
    David Mildenhall
    Join Date
    Jul 2009
    Location
    Reading, UK
    Posts
    235

    Default Re: multi-select checkbox or dropdown in search part

    How many teams are there and how many do you need to select at any one time?

    David

  4. #4
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Re: multi-select checkbox or dropdown in search part

    Steve Workings helped me troubleshoot a similar problem. I will post the code/solution when I get home this evening. We had to create an override to accomplish this.

  5. #5
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,254

    Default Re: multi-select checkbox or dropdown in search part

    Josh (or Steve or others),

    Could you help me out with this?

    The multi-select checkbox works for static list options, just not for the SQL-based dynamically-populated ones.

    Thanks in advance.

  6. #6
    Member
    Real Name
    Morgan Cohen
    Join Date
    Nov 2009
    Location
    Switzerland
    Posts
    29

    Default Re: multi-select checkbox or dropdown in search part

    I am also suffering from this bug. For me, checkboxes in the search part of a grid do not support multiple selection even with a static list of values.

  7. #7
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,222

    Default Re: multi-select checkbox or dropdown in search part

    Quote Originally Posted by christappan View Post
    I'm trying to filter records by team, and for the sake of simplicity, let's say they're team numbers 1, 2, and 3.

    Is there any way to have a checkbox or dropdown field in the search part that will allow me to search for records containing more than one of these teams at a time? Using the checkbox option or the dropdown, even as a multi-select, seems to return records only related to the last one picked--e.g. if I select 1 and 3, it only returns records with 3.

    Surely there's a way--I'm hoping so, because I'd like to spread this functionality throughout my application. I'm working against MS SQL tables, by the way, and the checkbox/dropdown options are dynamically populated from a SQL table if any of that matters to my question.

    Thanks in advance for suggestions.
    I don't really know what you are doing, but I very much doubt that there is a bug in the Search part relating to checkbox controls.

    There might be a mismatch of expectation on how the checkbox control works in a search part. It combines multiple selections with an OR operation. Some people might prefer to use the AND operation.

    Therefore I have added this as an option in the next update.



    http://www.ajaxvideotutorials.com/V1...luesFields.swf


    This file contains a pre-release of the updates to the aex file that will be in the next update. Exit from Alpha Five and unzip this file into your A5V10 program folder. You must also unzip it into the A5V10 Server folder if you are running the stand-alone App Server. http://downloads.alphasoftware.com/a...te/aex_v10.zip

    This file contains an update to the exe and dll files. Exit Alpha Five and unzip into your program folder. You must also unzip it into the A5V10 Server folder if you are running the stand-alone App Server. http://downloads.alphasoftware.com/a...dllexe_v10.zip

  8. #8
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,254

    Default Re: multi-select checkbox or dropdown in search part

    Selwyn, I appreciate your help on this, though my expectations aren't mistaken about how it works; I have two checkbox search criteria on one of my grids, and the second one works as expected while the first doesn't.

    I went back to this with full intentions of proving you wrong (at least in my mind) but found that the builder is working in cases that I didn't expect it to. However, it still doesn't work with the search criteria I need. I had previously thought the difference was between a static list and dynamic, but it's not--it's the type of SQL field itself. I'm trying to filter on our Team Leaders' ID numbers, which are a number field in the database. In fact, as I explored, under Checkbox Properties there are five settings on non-numeric fields while there are just two on the numeric fields (see attached). So Alpha's definitely treating these fields differently, perhaps for reasons above my head (entirely possible) or perhaps not. If it's the former, I'd love assistance in figuring it out.

    Thanks in advance.

  9. #9
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,222

    Default Re: multi-select checkbox or dropdown in search part

    Quote Originally Posted by christappan View Post
    Selwyn, I appreciate your help on this, though my expectations aren't mistaken about how it works; I have two checkbox search criteria on one of my grids, and the second one works as expected while the first doesn't.

    I went back to this with full intentions of proving you wrong (at least in my mind) but found that the builder is working in cases that I didn't expect it to. However, it still doesn't work with the search criteria I need. I had previously thought the difference was between a static list and dynamic, but it's not--it's the type of SQL field itself. I'm trying to filter on our Team Leaders' ID numbers, which are a number field in the database. In fact, as I explored, under Checkbox Properties there are five settings on non-numeric fields while there are just two on the numeric fields (see attached). So Alpha's definitely treating these fields differently, perhaps for reasons above my head (entirely possible) or perhaps not. If it's the former, I'd love assistance in figuring it out.

    Thanks in advance.

    if you truly believe that there is an issue here (i am not convinced), then you need to submit a proper bug report. a picture is not an adequate bug report.

    you need to send a sample app that demonstrates the problem, or step by step instructions on how to set up a test case with a database we both have (e.g. alphasports).

    thank

  10. #10
    Member
    Real Name
    Morgan Cohen
    Join Date
    Nov 2009
    Location
    Switzerland
    Posts
    29

    Smile Re: multi-select checkbox or dropdown in search part

    I solved my issue: "Allow 'Query by Form' syntax" (under Search Options) needed to be checked.

    Chris, does this help you?

  11. #11
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,254

    Default Re: multi-select checkbox or dropdown in search part

    After these recent posts, Selwyn and I corresponded and the root issues is that my search criteria was a numeric field. The example I gave was this:

    Individual Status Rep_ID
    Chris Current 4
    Selwyn Current 8
    Martin Pending 8

    I can use a checkbox to select Current and return Chris and Selwyn or I can select Current and Pending and return all three. But I can't do the exact same thing with Rep_ID because it's a numeric field. Maybe that's just understood by you veterans, but it was news to me.

    The good news is I got around it once I understood the issue. Now I'm including a column called "convert( varchar(4) , Rep_ID, 0) AS rep_id_char" in my query and then searching that column based on a similarly-converted query. Maybe someone else will benefit from this...
    Last edited by christappan; 06-15-2010 at 10:48 PM.

Similar Threads

  1. Set a default value in a search part dropdown on a grid
    By den1s in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 08-28-2009, 03:39 AM
  2. afterinsert based on multi-select dropdown
    By christappan in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 08-20-2009, 09:51 AM
  3. Pre-Select Options in a Multi-Select DropDown
    By roberto in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 05-21-2009, 04:37 PM
  4. Pre-Select Options in a Multi-Select DropDown
    By roberto in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 05-19-2009, 01:53 PM
  5. multi select xdialog/querry problem part deux
    By mark gebbie in forum Alpha Five Version 6
    Replies: 2
    Last Post: 06-26-2005, 10:58 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
  •