# defaultResult

This topic is 7004 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

hi everyone,

i have a Case calculation to provide a shortcut to writing out cities.

Case ( city_1 = "TO" ; "Thousand Oaks"; city_1 = "MO" ; "Moorpark"; city_1 = "NP" ; "Newbury Park")

i have read about defaultResult. but am having trouble putting it into the calculation. all the examples i have followed come back with errors.

i want the user to be able to type a city withOUT a shortcut and have the defaultResult show up.

thanks so much in advance...

##### Share on other sites

The default would be:

Case ( city_1 = "TO" ; "Thousand Oaks"; city_1 = "MO" ; "Moorpark"; city_1 = "NP" ; "Newbury Park"; "")

Notice the double quotes at the end of the Case. What happens if city_1 has no value, or an illegal value? The default takes care of that condition. The default can be any value you choose.

Steve

##### Share on other sites

I think the question is about something else (and in any case, a default null result is redundant).

Case (

city_1 = "TO" ; "Thousand Oaks";

city_1 = "MO" ; "Moorpark";

city_1 = "NP" ; "Newbury Park";

city_1

)

The last, unpaired, result is the default result. It will be returned if none of the preceding conditions is true.

##### Share on other sites

Shouldn't that be:

Case (

city_1 = "TO" ; "Thousand Oaks";

city_1 = "MO" ; "Moorpark";

city_1 = "NP" ; "Newbury Park" )

Now any value other then the 3 shown produce a null which is the default result or

Case (

city_1 = "TO" ; "Thousand Oaks";

city_1 = "MO" ; "Moorpark";

city_1 = "NP" ; "Newbury Park";

"South Park" )

Where "South Park" is the default value.

##### Share on other sites

Maybe. Let the poster clarify this. I took it that he has shortcuts for the 3 most-often occuring cities, but still wants to provide for explicit entry of other, less frequent cities.

The funny part is that poster recently initiated this.

##### Share on other sites

OK, I missed that part where he wanted to use the value entered.

##### Share on other sites

You guys did great. thank you so much. the answer was exactly what i needed. the defaultResult, was just the name of the field in quotes.

thank you guys again...

##### Share on other sites

This topic is 7004 days old. Please don't post here. Open a new topic instead.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account