I am trying to use Count() for a simple count of a string in a text field in a feature table in Pro.
It should be as simple as Count(fieldname)
Error
RyanBohan_0-1650643131800.png
Works on another field
RyanBohan_1-1650643222490.png
Both are text fields
Solved! Go to Solution.
Oh, right! It uses that first row to validate the script. Okay, try an expression like this:
var addr = $feature['Address_From2']
Iif(IsEmpty(addr), 0, Count(addr))By checking if the value is null first, and explicitly giving nulls an output value, this should pass validation.
Oh, right! It uses that first row to validate the script. Okay, try an expression like this:
var addr = $feature['Address_From2']
Iif(IsEmpty(addr), 0, Count(addr))By checking if the value is null first, and explicitly giving nulls an output value, this should pass validation.