Select to view content in your preferred language

Arcade labeling expression in ArcGIS Pro 3.1.0 - space character returns newline

252
2
Jump to solution
07-17-2024 07:18 AM
WayneSimoneauParsons
New Contributor

Hello Arcade community - I'm using ArcGIS Pro 3.1.0 & have a point feature class representing septic tanks. I want to label a map with the tank ID &  on a newline the tank capacity in gallons. The tank capacity field is a numeric float type.

I'm want the label to be this:

ST-1

1,250 gals.

Here's my expression:

$feature.wwstank_id + TextFormatting.NewLine + text($feature.tank_cpcty,"#,###") + " gals."

returns this:

ST-1

1,250

gals.

When I remove the space preceding  gals. 

$feature.wwstank_id + TextFormatting.NewLine + text($feature.tank_cpcty,"#,###") + "gals."

returns this:

ST-1

1,250gals.

Please help me understand how to use a space character.

Thnx!

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Check your label settings. It may have "stack" enabled, which will insert line breaks on spaces and commas as the program deems necessary to fit everything in. Unchecking the box lets you define the label lines as you need.

jcarlson_0-1721226378173.png

 

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

Check your label settings. It may have "stack" enabled, which will insert line breaks on spaces and commas as the program deems necessary to fit everything in. Unchecking the box lets you define the label lines as you need.

jcarlson_0-1721226378173.png

 

- Josh Carlson
Kendall County GIS
WayneSimoneauParsons
New Contributor

That was it. Stack Label was enabled. Thank You!

Wayne Simoneau

0 Kudos