Showing posts with label quotelsequot. Show all posts
Showing posts with label quotelsequot. Show all posts

Wednesday, March 7, 2012

expression builder switch()

Via the Expression Builder, I'm using the switch() program flow function to handle my data. I can't seem to figure out how to do the "else" or "default" part of it. Anyone have a clue? Ex:

Switch(
Fields!test.value = 1, "One",
Fields!test.value = 2, "Two",
Fields!test.value = 3, "Three",
)

But what if Fields!test.value is not either 1,2, or 3, how would you set the "else" or "default" part within the switch statement?

Add a condition at the end which always evaluates to true.

Switch(
Fields!test.value = 1, "One",
Fields!test.value = 2, "Two",
Fields!test.value = 3, "Three",
1=1, "Default"
)