/
Formatting Functions
Formatting Functions
The following api. functions are available:
Name and Link to API Doc | Code Example |
---|---|
def cost = api.getElement("MarginPct")
def myOptions = ["A" , "B" , "C" ]
return api.attributedResult(cost)
.withBackgroundColor(cost < 0.30 ? "red" : "#0101DF")
.withSuffix(cost < 0.30 ? "!!!" : null)
.withTextColor(cost < 0.30 ? "white" : null)
.withTextDecoration(cost < 0.30 ? "underline" : null)
.withManualOverrideValueOptions(myOptions) | |
Formats a number into a string. api.formatNumber("###.##",length) Syntax with 2 parametersString formatNumber(String pattern, Object n); Formats a number into a string. Same semantics as {@link java.text.NumberFormat} and {@link java.text.DecimalFormat#applyPattern} @param pattern The pattern string Syntax with 3 parametersFormats a number into a string. Same semantics as {@link java.text.NumberFormat} and {@link java.text.DecimalFormat#applyPattern} @param pattern The pattern string | |
, multiple selections available,
Related content
How can I set format for column in matrix input?
How can I set format for column in matrix input?
More like this
Result Functions
Result Functions
Read with this
How to Set the Number of Displayed Decimals in User Input
How to Set the Number of Displayed Decimals in User Input
More like this
How to Configure Dashboards with Result Matrix Click Events
How to Configure Dashboards with Result Matrix Click Events
Read with this
How to add a manual editable attribute in a LPG, based on restricted fields (like the "option()" in Java for quotes?
How to add a manual editable attribute in a LPG, based on restricted fields (like the "option()" in Java for quotes?
More like this
parameterConfig of Input Fields
parameterConfig of Input Fields
Read with this
Found an issue in documentation? Write to us.