pensive Posted June 11, 2005 Posted June 11, 2005 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...
SteveB Posted June 11, 2005 Posted June 11, 2005 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
comment Posted June 11, 2005 Posted June 11, 2005 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.
RalphL Posted June 11, 2005 Posted June 11, 2005 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.
comment Posted June 11, 2005 Posted June 11, 2005 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.
RalphL Posted June 11, 2005 Posted June 11, 2005 OK, I missed that part where he wanted to use the value entered.
pensive Posted June 12, 2005 Author Posted June 12, 2005 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...
Recommended Posts
This topic is 7173 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 accountSign in
Already have an account? Sign in here.
Sign In Now