```
if then
MyVar :=
else
MyVar := ;
```
Refactoring to
`MyVar := ? : ;`
would be absolutely amazing.
Comments
This would be fantastic!I've used Ternary operators in other languages and it's the one thing I really miss in AL development:result := (test1 = true ? 1 : (test2 = true ? 2 : 3));
Category: Development
Also, this operator needs to work in the report columns expression.
Category: Development
I don't know why I can't vote for this idea, but I support it 200%!
Category: Development
Oof, the editor didn't like that, let's try again...
Being able to refactor the following code:
if {Boolean expression} then
MyVar := {Value 1}
else
MyVar := {Value 2}
to
MyVar := {Boolean expression} ? {Value 1} : {Value 2}
would be great.
Category: Development
Business Central Team (administrator)
Best regards,
Business Central Team