I am trying to set the color of a calculated value to be green. It's a decimal field and a simple equation, but I'm not getting anywhere with the samples provided by Esri or in the reference tab.
This is what I have tried: <div style="color:green">round(sum(${REL_TOTAL_VOL}),2)</div>
but S123 just kicks back an error that is doesn't understand the string.
Solved! Go to Solution.
You would put the html in the label field and you might need to adjust it a bit to meet your needs. Maybe something like this:
<div style="color:green">Total Event Volume (BBL): ${TOTAL_EVENT_VOL}</div>
Try this to see if it worker for you, put the calculation in a helper field.
helper field calculation = round(sum(${REL_TOTAL_VOL}),2)
then in a note field put the html formatting:
note field label = <div style="color:green">${helperfield}</div>
It's still not liking something
You would put the html in the label field and you might need to adjust it a bit to meet your needs. Maybe something like this:
<div style="color:green">Total Event Volume (BBL): ${TOTAL_EVENT_VOL}</div>
Wouldn't that set the color for just the label and not the calculated values in the box?
@Slamon Its ends up being dynamic text and not a "value".
If you want you should be able to format more like a table like your picture using html, it would be trial and error for me, but it should be possible. Or use multiple html tags to have a black label and a green value.
Might have to tweek some more and update the field names but here is an example of a html table format you can paste in the label field of your note:
<table border="1">
<tr>
<th>Total Event Volume (BBL)</th>
<th>Total Event Oil Volume (BBL)</th>
<th>Total Event Produced Water/Other Volume (BBL)</th>
</tr>
<tr>
<td style="color:green">${TOTAL_EVENT_VOL}</td>
<td style="color:green">${TOTAL_EVENT_VOL}</td>
<td style="color:green">${TOTAL_EVENT_VOL}</td>
</tr>
</table>
Nevermind... I see where I went wrong with your example, and that should work.