I need to exclude all values that contain any letter from one of the fields. Basically only integers should be left. What code (Python/VB) do I have to put in field calculator for that?
Thanks!!!
I removed space and got this error...
Then I tried to use single quotes like you wrote and got this:
The following works as a field calculator expression in Pro and also in ArcMap. Check the details
Thank you !
LOL I just got back to the office.... I only jumped in because it sounded like she only wanted to ignore those rows that had a character in it... When using python, now, I avoid nulls and put an empty/blank/unused code filter and delete in a two step process since I do not trust finding nulls yet in python.
Liana I am happy you got it worked out! That's all the matters!
Liana,
Using Python, the Codeblock (Pre-logic Script Code) would be:
def result(value): import re return "" if re.search("[a-zA-Z]", value) else value
And the calculation would be:
result( !<FIELD_NAME>! )
Be careful overwriting the same field. You can't undo it unless you start an edit session first.
Larry