Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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...

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.