When using the field calculator, how do I get data from the previous row in VBScript? In Python I'd do something like this:
for index, row in enumerate(rows,start=1):
row[index-1] += 5
I'm using ArcGIS 9.3.1.
Let's assume I have a column [Distance]
and all it's rows are 0
. How do I increment every row with 5 starting at row 1. So the first row remains 0
, second row'll be 5
, third 10
and so on.
Best Answer
This script is from the Easy Calculate 5.0 Scripts by Ianko Tchoukanski
This section goes in the code block. Set the
lInterval
andlStart
values as necessary. In this case,lInterval = 5
andlStart = 0
.Place this in the
[Field Name] =
area: