Happy New Year everyone

a question:  "is it possible to conditionally colour a field in a form"

Based on the grid ComparativeCashFlowBalanceTotals in
ReportFinancialSummaryForms.xml

I tried the following groovy

<field name="balance1" title="Period1" title-area-style="${groovy: if
(balance < 0 ) red ?: green }" widget-area-style="green"
widget-style="tabletextright"><display type="currency"
currency="${currencyUomId}"/></field>

but get the error:

The value of attribute "title-area-style" associated with an element type
"field" must not contain the '<' character.org.xml.sax.SAXParseException;

I tried using alternatives such as

if (Maths.signum(balance1).equals(-1) )

etc but had no success to date.  Is there a number equivalent of "red-when"
that is available for date fields.

Any suggestions on how this could be implemented would be appreciated

I suspect I've overlooked something very obvious

thanks and kind regards

Ernest

Reply via email to