Alpha Video Training
Results 1 to 5 of 5

Thread: Drop Down Filter Issue

  1. #1
    "Certified" Alphaholic Charles Hoens's Avatar
    Real Name
    Charles Hoens
    Join Date
    Sep 2000
    Location
    Princeton, NJ
    Posts
    1,171

    Default Drop Down Filter Issue

    One would think that this would be kind of simplistic, but here goes.

    I have a simple V11 grid. One of the fields calls an attached dbf with various choices for that field. That is working perfectly. So far, so good.

    However....I created a second field on the same grid that is a drop down field. That field is supposed to allow the user to enter various outcomes based on the previous "on-same-grid-line" selection. So, to make this more clear, if the user selects "AA" for field1, then he should be filtered for field2 to the possible selections for that entry.

    For example, the Field2 entry is attached to a dbf with selections like:

    Field1 Field2
    AA Good
    AA Not so good
    AA Pretty Good
    BB Terrible
    BB Really Bad

    If the user selects "AA" for Field1, then the choices to be displayed for Field2 should be the ones relative to "AA" and so on.

    In desktop, this is easily accomplished by filtering within the dbf properties itself, but I can't get it to work in Server.

    I tried using the OnChange event for Field1, setting that input value to a session variable, then using it on the dropdown menu for Field2. Also, I tried several Javascript events, but nothing seems to be working.

    This seems so simple, but it is alluding me. Any ideas?

    Charlie

  2. #2
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,406

    Default Re: Drop Down Filter Issue

    Check out video M47

  3. #3
    Member 2ninerniner2's Avatar
    Real Name
    Lyle
    Join Date
    Mar 2012
    Location
    Calgary, AB
    Posts
    236

    Default Re: Drop Down Filter Issue

    Charlie -

    This is done quite nicely and easily using Cascading choices

    DropDownBox Properties > Choices > Cascading choices

    - note: of course, you don't set this for the first DD field; just for subsequent ones that are dependent upon the preceding one.

    In one of my apps, I use 3 DDs to narrow the selection of employee records to view:

    Department | Group | Role

    - Department does NOT have Cascading set
    - Group has it set with the parent control set to Department
    - Role has it set with the partent control set to Group

    Works like a charm :)

    Cheers!
    Lyle

    PS> Field Naming Conventions using MySQL ... guess how much hair I pulled out trying to figure out why the Role wasn't populating properly! LOL ... you got it! ... I had named the field "group", which of coure is a reserved word! LOL :)

  4. #4
    "Certified" Alphaholic Charles Hoens's Avatar
    Real Name
    Charles Hoens
    Join Date
    Sep 2000
    Location
    Princeton, NJ
    Posts
    1,171

    Default Re: Drop Down Filter Issue

    Thanks all.

    The videos were great and demonstate yet again the sheer genius of the Alpha Team and this product. NO ONE else on the planet does this stuff!

    Charlie

  5. #5
    Member
    Real Name
    James Coke
    Join Date
    Dec 2009
    Location
    Gig Harbor, WA State USA
    Posts
    10

    Default Re: Drop Down Filter Issue / Multiple Cascading Filters

    Adding to this old thread; I can't figure out how to use multiple parent controls when cascade filtering one DropDownBox.

    DropDownBox_Cascading Choices.jpg

    There appears in the component DropDownBox-Properties-Choices to be a way to explicitly filter a list based on not one but multiple parent DropDownBoxes simultaneously in the same grid. This filter presumably builds a WHERE clause that further constrains the Select statement configured above it. The help gives a syntax of the form 'field1=:c_parentAfield AND field2=:c_parentBfield'. This only makes sense when leaving the Parent Control property blank since that allows selection of only one parent control, not the two required in the explicit filter.

    The error "the parent control has not been defined" appears when the component is saved.
    Thanks in advance for any guidance that avoids the elaborate coding documented in video M47, etc..

Similar Threads

  1. QBE filter drop down issue
    By djcamo in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 06-05-2012, 02:22 AM
  2. Drag and drop -- is it a dead issue?
    By rmcgaffic in forum Alpha Five Version 9 - Desktop Applications
    Replies: 14
    Last Post: 11-10-2009, 11:57 AM
  3. Filter for drop down box
    By cavj1 in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 05-28-2009, 11:10 AM
  4. Drop Down Box Filter
    By lionking15 in forum Alpha Five Version 9 - Desktop Applications
    Replies: 29
    Last Post: 05-24-2009, 01:35 PM
  5. Issue with drop down list in emb browse
    By gaby_h in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 11-24-2008, 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
  •