AnsweredAssumed Answered

Dynamic text returns <NULL> value when using Sum.

Question asked by ghaskett on Nov 4, 2019
Latest reply on Nov 7, 2019 by ghaskett

Hello,

 

I am trying to use a Dynamic Text box to return the sum value of a numeric field which has been filtered using a custom query via the Insert Table Statistic tool.

 

My problem:

If the query returns a feature, then the Dynamic Text returns the appropriate sum.

However, if the query does not return a feature, the Dynamic Text returns a <NULL> value.

In the same scenario, the Count tools returns a (0) value.

 

I understand that there are no values returned to sum, however shouldn't there be an option for a default value such as (0)?  There appears to be one when dealing with a string values, but not when dealing with numeric values via the sum statistic tool.  

 

Does anyone know how to work around this so I can get a default value of (0) returned if there are no features that match the query?  I know ArcGIS Online has an option as well, seems logical that there would be an option in ArcGIS Pro....

 

Here is my Dynamic Text code in the Format Text properties box.  Note, I tried using the emptyStr="0" option, but it did not work.  Is there an equivalent as an emptyIntegar=(0)?

<dyn type="table" property="sum" mapFrame="Map Frame" mapMemberUri="CIMPATH=59c80d386578416b83006b9fd9763d66.xml" sql="PROVINCE = 'FEZZAN'" field="INJURED" decimalPlaces="0" separator="false" emptyStr="0"/>

<FNT style="Regular" size="20"> INJURED </FNT>

Thanks,

Outcomes