Question
Calculated field CASE statement examples
Hi, does anyone have any examples of CASE() statements used in calculated fields on a custom form?
I am trying to use the following and while it doesn't say there are any errors, it also doesn't pull back any data!
I have 2 custom fields, one with a nested If statement and the other I am trying to set up with a Case statement.
DE:MA - Choose the region Calc2
IF({DE:MA - Choose the region}= "en-gb", "GB/",
IF({DE:MA - Choose the region}= "en-ie", "IE/",
IF({DE:MA - Choose the region}= "en-us", "US/",
IF({DE:MA - Choose the region}= "en-ca", "CA/",
IF({DE:MA - Choose the region}= "fr-ca", "FR-CA/",
IF({DE:MA - Choose the region}= "fr-fr", "FR/",
IF({DE:MA - Choose the region}= "fr-ma", "FR-MA/",
IF({DE:MA - Choose the region}= "fr-be", "FR-BE/",
IF({DE:MA - Choose the region}= "nl-be", "NL-BE/",
IF({DE:MA - Choose the region}= "de-de", "DE/"))))))))))
- This returns FR-CA/ OR CA/ as expected.
DE:MA - Choose the region CASE
CASE(
{DE:MA - Choose the region} = "en-gb", "GB/",
{DE:MA - Choose the region} = "en-ie", "IE/",
{DE:MA - Choose the region} = "en-us", "US/",
{DE:MA - Choose the region} = "en-ca", "CA/",
{DE:MA - Choose the region} = "fr-ca", "FR-CA/",
{DE:MA - Choose the region} = "fr-fr", "FR/",
{DE:MA - Choose the region} = "fr-ma", "FR-MA/",
{DE:MA - Choose the region} = "fr-be", "FR-BE/",
{DE:MA - Choose the region} = "nl-be", "NL-BE/",
{DE:MA - Choose the region} = "de-de", "DE"
)
- Does not return anything and shows N/A
Any help on what is wrong with my expression would be apprciated. Bonus points if you can help me wrte it without repeating {DE:MA - Choose the region}
all the time and just having this as the one input for it all!
Thanks