January 06, 2009, 05:07 PM
ChannySQuestion about chaining
I'd like to be able to have two separate chains off of one control. Is there any way to do this in the HTML tool?
Example:
Country->Cars->Sales
Country->Model
When the user selects Country, Cars should be filtered based on the newly selected and model should be filtered based on the newly selected country.
Right now, when I already have the first chain set up and I just select Country and Model together and chain them, Model becomes item number 4 on the first chain as opposed to item number 2 of a second chain.
Is there anyway to do this?
January 07, 2009, 02:06 AM
Tony AYes, but not using the Master files for combo box population. Use fexes instead because then you would only add the selection on the variables you want -
fex for model
TABLE FILE CAR
.....
WHERE COUNTRY EQ '&Country'
fex for car
TABLE FILE CAR
.....
WHERE COUNTRY EQ '&Country'
fex for sales
TABLE FILE CAR
.....
WHERE COUNTRY EQ '&Country'
WHERE CAR EQ '&Car'
T
January 07, 2009, 09:25 AM
ChannySTony,
Thanks that works great. I have one more interesting scenario, though, that I should have added on to begin with.
There is another control at the end of the chain.
Using the previous example:
Country->Cars->Sales
Country->Model
The last control would be for example, RETAIL_COST that should get updated if either chain gets updated. If it's the first chain then I'd want RETAIL_COST to be filtered based on all the filters of the first chain and if it's the second chain, then all the filters of the second chain. I can potentially know which "state" I'm in by having the user select from a radio button on the page to let me know that "chain 1 is in use" or "chain 2 is in use". Am I asking for too much here?
On a slightly different topic - I've noticed that once I've used a procedure to populate a control in a chain, any controls below that in the chain will not get populated if I want to populate it dynamically from the database. Am I doing something wrong or is that just a fact of life?
Thanks.
January 07, 2009, 09:28 AM
ChannySActually,
Just as I'm thinking about my first question - I guess I could take your idea and use the radio button selection to decide which 'WHERE' statement to include for populating the RETAIL_COST control and that should be good!
January 07, 2009, 10:05 AM
Tony AI always stick to fexes for population of combos as it is more controlable.
T