Select to view content in your preferred language

Dynamic text: Possible to change number format directly in the dynamic text properties rather than through attribute table's field properties?

2717
2
08-30-2021 05:58 PM
LindsayWithers1
Frequent Contributor

I'm working with dynamic text for Data Driven Pages in ArcMap. Is it possible to change number format (such as number of decimal points, thousands separators, or formatting a number as a percentage) directly through the dynamic text properties dialog rather than through the attribute table's field properties? We have some Data Driven Reports with a lot of dynamic text, and while we try to avoid adding new unformatted fields to the datasets, sometimes it happens and it can take a while to go through each field and reformat the numbers so that they show up correctly through the dynamic text. 

0 Kudos
2 Replies
David_Brooks
MVP Regular Contributor

@LindsayWithers1 , here you go:

https://pro.arcgis.com/en/pro-app/latest/help/layouts/add-and-modify-dynamic-text.htm

""""""""""""""""""""""""""""""""""""""""""""""""

Numeric values

You can modify the number of decimal places used by tags that return numeric values using the decimalPlaces attribute. For example, <dyn type="mapFrame" name="MapFrameName" property="lowerMid" units="ddm" decimalPlaces="0"/> appears as -95 13 32 58, and <dyn type="mapFrame" name="Map Map Frame" property="lowerMid" units="ddm" decimalPlaces="2"/> appears as -95 13.29 32 57.68.

""""""""""""""""""""""""""""""""""""""""""""""""

...then check the section about Pre and Post tags, if you want to add % symbols on etc.

If you want to display a decimal value as a percentage, you could just set up an Attribute Rule in a new field to multiply the main field by 100.


David
..Maps with no limits..
OleNowak
Occasional Contributor

Seems only to work with dynamic attributes of type "mapFrame".

In my example it does not work on a map series for an attribute field with datatype double.

<dyn type="page" property="attribute" field="angle" decimalPlaces="2" />

This always results in the double value like "88" "88.1" "88.12" "88.123" "88.1234"

Iwould like to have it with 2 decimal places: "88.00" "88.10" "88.12" "88.12"

 

And the dynamic text does not recognize the settings for the numeric field in the fields definition.

0 Kudos