AlexBennett3
5 years agoQrew Trainee
Formula Change from Decimal to Percentage
Hey Everyone,
This is a Rich Text field.
I'm working on a formula that takes a field and adds some styling to try and make the field larger while being highlighted based on its value. I've been able to get the result highlighted as wanted for display purposes, but my percentage field reverts back to decimal on display, is there something I can add to change this back to percentage?
The result is being highlighted but in decimal: 0.2813488
But it should be: 28.13%
Any recommendations on what I can add to the code to revert this back to decimal? ([Total Job Gross Margin F] value is 28.13%)
Thanks,
Alex
------------------------------
Alex Bennett
------------------------------
This is a Rich Text field.
I'm working on a formula that takes a field and adds some styling to try and make the field larger while being highlighted based on its value. I've been able to get the result highlighted as wanted for display purposes, but my percentage field reverts back to decimal on display, is there something I can add to change this back to percentage?
var number margin = [Total Job Gross Margin F];
If( $margin >= 0 , "<span style=\"background-color:#fbff00; font-size:16px; font-weight:bold\">"&$margin&"</span>", "<span style=\"background-color:#ff0000; font-weight:bold\">"&$margin&"</span>" )
The result is being highlighted but in decimal: 0.2813488
But it should be: 28.13%
Any recommendations on what I can add to the code to revert this back to decimal? ([Total Job Gross Margin F] value is 28.13%)
Thanks,
Alex
------------------------------
Alex Bennett
------------------------------