Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Always one selected value but across two list boxes

Hi,

I have two related list boxes, one is county and the other is city. A country has many cities; a city has one country.

The user must only be able to select either one whole country, or one whole city. So I want one selected value in either the country or city.

If I put always one selected value on the city, it is not possible to view an aggregated country. If I put always one selected value on a country, you can only select cities in that country, until you select another country.

Any ideas how I can achieve what I want? I thought triggers might do the job somehow... But no joy as yet!

Thanks,

MrMadders

1 Reply
marcus_sommer

As a general advice I think you should have a very good reason to bypass the inbuild qv usability which are in the most cases very easy (to learn) and logical for the users and which should be applied very constantly over all sheets and applications. All situations where you differed from the standard usability you will need efforts to build and maintain these logic and more important you will have to find ways to inform the users what happens by selecting from this and that and what will be (why) calculated.

I believe it's rather not possible to chain two listboxes respectively fields together without some drawbacks. So I suggest you to use two normal listboxes and restrictive possible misinterpretations by conditions on the calculation, like:

getselectedcount(country) = 1 xor getselectedcount(city) = 1

and advice your users per error-message what is wrong and what they should do selecting.

- Marcus