ARCADE Expressions Notes

To add a new Line

 textFormatting.newline

To adjust number of decimals during labeling

In the Label Class Expression window display the field that would be used to label. 

Round($feature.fc_field_name, 3)

More on the math functions in Arcade here – Math functions | ArcGIS Arcade | ArcGIS Developers

Add thousand separator

Similar situation here as in the example above. But this time, on top of formatting number of decimals we want to add thousand separator to long numbers. Instead of rounding the number, we would convert into a text and apply formatting:

Text($feature.fc_field_name, ‘#,###.##’)

Additional reference: How To: Add Thousands Separators to Labels in ArcGIS Pro (esri.com)

Adjusting font color and boldness

 Let’s say we have a box of text, and we want different parts to be colored differently.

For color use tags <CLR></CLR>. Add the color reference: <CLR blue=’255′>

To make the font bold, use <BOL></BOL> tags. Example:

“<BOL>”+ $feature.NAME+“</BOL>” + textFormatting.NewLine + “Exp: ” + text($feature.date, ‘M/D/Y’)

Additional References: