Select to view content in your preferred language

Number Format not reflected in Labelling (DATE field)

1621
5
Jump to solution
06-30-2021 08:37 AM
Labels (1)
BrianBulla
Honored Contributor

Hi,

Just wondering if you set the Number Format for a specific field, should that also be reflected in the Labeling of that field in the map?

For example, I have the Number Format for a DATE field set to this:

BrianBulla_0-1625067366517.png

 

But in my map it just shows the default format.  In the table it is showing the proper format though.  Is this a glich, or just how it works??

0 Kudos
1 Solution

Accepted Solutions
WendyHarrison
Esri Contributor

ah - vbscript, jscript and python will respect the field formatting that is set.  You're using Arcade (the default label expression language in Pro), which pulls the raw feature and then gets the field value - it doesn't go through the field formatting.  This method is better in the long term as it is more portable for the expressions.
If you want to switch to a different language you can do that on the Label Class pane on the expression tab - see the help topic referenced above.

View solution in original post

5 Replies
WendyHarrison
Esri Contributor

Hi Brian,

For labeling you'll need to set up the formatting in the label expression.

https://pro.arcgis.com/en/pro-app/latest/help/mapping/text/specify-text-for-labels.htm

at the end of this topic are links out to the languages Pro supports 

thanks

Wendy

0 Kudos
BrianBulla
Honored Contributor

Yes, I understand, but why is the label not taking on the format that you apply to the field?  Seems easier to just set it in one place than to have to go to multiple different places to show the same formatting.

 

0 Kudos
WendyHarrison
Esri Contributor

ah - vbscript, jscript and python will respect the field formatting that is set.  You're using Arcade (the default label expression language in Pro), which pulls the raw feature and then gets the field value - it doesn't go through the field formatting.  This method is better in the long term as it is more portable for the expressions.
If you want to switch to a different language you can do that on the Label Class pane on the expression tab - see the help topic referenced above.

BrianBulla
Honored Contributor

That's great.  Thanks for the explanation of what is going on.  Is there a way to set the default language so I don't have to go in and manually change it for each layer?  Perhaps a system setting that overrides everything??

0 Kudos
WendyHarrison
Esri Contributor

We don't have that option at the moment.  There's an idea that you can vote up and add comments to.  I'll post below

 

https://community.esri.com/t5/arcgis-pro-ideas/choose-your-default-scripting-language/idi-p/1031561