I want to be able to switch in one of three images (an up arrow, down arrow, or square) depending on whether a particular number has gone up, gone down, or stayed the same.
I have a function call that allows me to check this - but I want to set both the img src and the title attribute based on it.
At the moment this means calling the function twice, once for each attribute. Which isn't a solution I'm happy with.
Is there any way to call the function once and then set both attributes based on the response?
Existing code:
<img src="{{trendImage(metric.scoreCardPassed, metric.scoreCardTrend).image}}"
title="{{trendImage(metric.scoreCardPassed, metric.scoreCardTrend).description}}">