Performing mathematical operations with Dynamic Text Elements in ArcGIS Pro

719
1
06-04-2019 08:33 AM
RVG296
by
Occasional Contributor

I have a map that has two layers (TFS_ALL and FD_ALL) which actually feeds the data from two tables in SQL server. There is also a third table called (ALL_ALL) which has the combined (UNION_ALL) information of TFS_ALL and FD_ALL from the SQL server. I am trying to use a Dynamic text for printing the sum of all the values in the field "acres" of these two layers (TFS_ALL, FD_ALL) and round them. Now when I use a third dynamic text element to print the sum of acres of TFS_ALL and FD_ALL, I am unable to find any dynamic text functionality for adding two dynamic text strings which are actually numbers. I even tried to add them using ArcPy module in python, but that didn't work either. Please find below screenshots related to it. How do I add up 9 and 11 below to get 20? Both 9 and 11 are dynamic text elements and they change based on the data that feeds from SQL server. I obtained 16 by using dynamic text count (since it is irrespective of rounding )from SQL table (ALL_ALL) but if I use sum there will be rounding issues and they might not always add up to give the exact correct number (there may be slight tradeoffs 1 more or less), which is the reason I am trying to add the TFS and FD dynamic text elements. 

Is there a way to do this either through Pro or Python?

0 Kudos
1 Reply
GeoNZ
by
Occasional Contributor

 I have a similar question, but related to simple text formatting. For example, the Dynamic text item for a map center, when given the unit value 'mgrs' and round of 0 returns '60HXD' (i.e. the UTM zone and grid square) as its smallest value. I want to take that value and just display, for example, the first 3 characters (i.e. 60H) or the last 2 (i.e. XD).

It doesn't appear that you can assign the value of a dynamic string and then modify it?

0 Kudos