Question
Else statement for < pega:when name="WHENCONDITIONNAME" >
Hi,
Quick question. I am highlighting some rows in a Grid that meet a certain condition like below screenshot.
And, here is how I do it:I set above snippet <pega:when name="WHENCONDITIONNAME">background-color: #FDD7E4;</pega:when> in a row properties in a Repeating Grid. This method works fine but what was the syntax for ELSE statement? What I mean by this is, I want to use two colors - color 1 for WHENCONDITIONNAME and if the condition isn't met, I want to use color 2.
p.s.
I could create an another when rule that is just an opposite of WHENCONDITION and provide two pega:when in the snippet but I don't want to create this unnecessary when condition because it is verbose.
Thanks,
Sorry, when I searched PSC, I found it real quick. Here is how I did it:
<pega:choose><pega:when name="WHENCONDITIONNAME">background-color: #blue;</pega:when><pega:otherwise>background-color: red;</pega:otherwise></pega:choose>
Thanks,