Am I crazy? Or can this be accomplished?
I have a value that comes from the database. It could be one of three different numbers:
0 = Off
1 = On
666 = Archived
I want to display the word and not the number. I’m able to do it if it was just a zero or a one but not for all three. Check it out:
<div class="col">
<h1>TEST: Or for three values</h1>
<p>Starting Var3 Value: {{var3.value}}</p>
<p>Single Example (only values of zero or one): {{var3.value == 0 ? 'True' : 'False'}}</p>
<p>Solution: {{(var3.value == 0 ? 'Off') || (var3.value == 1 ? 'On') || (var3.value == 666 ? 'Archived')}}</p>
</div>
Nothing is returned for the “Solution”. Is this even possible?
Community Page
Last updated:
Last updated: