So I have a bunch of ObjectID
s that have null
id
values. These null values start from ObjectID 20866
to 21899
. ObjectID 20865
has id
value 30542
so the next id value for ObjectID 20866
would be 30543
and then so on till ObjectID 21899
.
How can I do this using Python in Calculate Field using a For loop and may be a ++
counter?
I am using ArcGIS Pro 3.1.1
.
1 Answer 1
Select the rows where ID is null, then you can use the field calculator on the ID field with the expression !objectid! + 9677
since 9677
is the difference in value of your OBJECTID and ID fields.
Explore related questions
See similar questions with these tags.
!objectid! + 9677
.9677
doing?!objectid!
it should be!id!
since the first calculatedid
value will be1 + 30542
where30542
is the lastid
value before the nullid
values start?!objectid! + 9677
.