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
Works on another field
Both are text fields
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.
Thank you @jcarlson! That does it.
Thanks for the suggestion, I am still getting the error.
It appears if the first row is <null> that is when the error happens. I am using ArcPro 2.9.2
I am pulling in a csv, and exporting the table to gdb
Current work around is adding in a dummy row of values.
Hmmm. Does it behave any differently if you use bracket notation? As in, $feature['Address_From2']?
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.