Ternary Expressions

No clue how the syntax would work. Maybe an inline block? But right now I either have to have a custom block or do:

  • Create Local Variable (value if false)
  • If Statement
    • Update Local Variable (Value if True)

it’s a lot of blocks when you need a lot of ternaries.

EDIT: Thought of something that might work. A block kinda like the if statement, but it would have an input for “value if true” and “value if false” and would output the value depending on if it was true or false. It wouldn’t be a parent block and would also output whether it was true or false. This would be insanely helpful!!!

Good idea, should I call it “Conditional Value”? I feel like a lot of people aren’t going to know the term Ternary and it over-complicates things IMO.

1 Like

Added this block, it is called Conditional Value.

1 Like