I am often finding that I need to display different text based on the values of multiple parameters. For example consider having CODE and DESC fields.
- When both are non-null you want to display "CODE : DESC" (Note the separator)
- When only DESC is null you want to display "CODE : ---"
- When only CODE is null you want to display "--- : DESC"
- When both are null you want to display "Unavailable"
While we can perform these checks with nested IIFs or nested ternaries it is very clumsy. If/elseif/else statements, or better yet, switch expressions would go a long way to making more readable expressions.