Drop combo related to another drop combo 
Author Message
 Drop combo related to another drop combo

Does anybody know how to make the contents of one combo depend on the
contents of ANOTHER combo? Imagine two combos, one for Brands, one for
Products. The user selects the brand first, and then the product. The
Product combo should only show the children of the selected brand, *NOT*
all the products on file.

I've looked at the template code, and it doesn't look like this is
supported without embedding code. I've tried this and that at several embed
points, but can't quite get it right. If I successfully get it to limit
Products to children of Brands, then the controls stop displaying correctly
when opening a window to change the record. If I fix that, then something
else stops working. And round and round. :)

Any suggestions are much appreciated!



Sat, 26 Jun 1999 03:00:00 GMT  
 Drop combo related to another drop combo

In standard CW templates the drop combo queues are filled when the
window is opened, that is also when the filters or range limits for
the drop combos are applied.

If you wish to limit the records in a drop combo based on user input
into a field then you need to refill the drop combo queue when that
field is accepted.  You do that by calling the routine ...

DO FLD1::FillList

Where FLD1:: refers to the field SEQ# for the drop combo that you want
to fill.  If in doubt, look at the source code to see which FLD value
you need.

Quote:

>Does anybody know how to make the contents of one combo depend on the
>contents of ANOTHER combo? Imagine two combos, one for Brands, one for
>Products. The user selects the brand first, and then the product. The
>Product combo should only show the children of the selected brand, *NOT*
>all the products on file.

>I've looked at the template code, and it doesn't look like this is
>supported without embedding code. I've tried this and that at several embed
>points, but can't quite get it right. If I successfully get it to limit
>Products to children of Brands, then the controls stop displaying correctly
>when opening a window to change the record. If I fix that, then something
>else stops working. And round and round. :)

>Any suggestions are much appreciated!

    Geoff Bomford
     ComForMark
  Sydney, Australia


Thu, 01 Jul 1999 03:00:00 GMT  
 Drop combo related to another drop combo

Hi Geoff,

Quote:
>If you wish to limit the records in a drop combo based on user input
>into a field then you need to refill the drop combo queue when that
>field is accepted.  You do that by calling the routine ...
>DO FLD1::FillList
>Where FLD1:: refers to the field SEQ# for the drop combo that you want
>to fill.  If in doubt, look at the source code to see which FLD value
>you need.

Just a tip to add to your tip. Instead of looking in the generated
source code (after generating, then editing XYZ.CLW), you can find it
faster by taking a look at the Window source button [...] on the
Procedure Properties screen. Find the control, then the #SEQ(x) number
gives the number to use in the DO FLDx::FillList routine.

Cheers
--
Steve Greenwood
HiCaliber Software



Sat, 03 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Drop Combo dependent on another drop combo

2. Drop Combo to Auto Drop

3. Show Related Files In A Drop Down Combo (C5EEB)

4. Drop Down Combo Box Issue?

5. File Drop Combo with ODBC file

6. File Drop Combo Filter Problems

7. Remove duplicates entries not working on file drop combo box

8. Drop combo - restore to blank condition

9. Select from File Drop Combo Box ?

10. File Drop Combo

11. Using Alias with Drop Down Combo

12. Drop Combo Problem

 

 
Powered by phpBB® Forum Software