briancoward

Check multiple fields unique and populate w/ new acreage.

Discussion created by briancoward on May 9, 2011
Latest reply on May 9, 2011 by briancoward
Hello everyone,
Iâ??m trying to automate a process that would take far too long to do manually. Iâ??ve got differing acreage ([SHP_Acreage]) values for separate polygons that are a part of the same parcel ([APN]). I need the acreage values to all be the same if they are a part of the same parcel.

Iâ??m looking for some help on the logic. Iâ??m starting from a script that I believe is, somewhat, close to what I want from Vijay Kumar iDup. Thanksâ?¦ Vijay. Thanks for any helpâ?¦ itâ??s really all a bit beyond me.

[APN_Acreage] field (as Long) Calculation logic =

Static d As Object
Static i As Long
Dim iDup As Integer
Dim aField
Dim bField

aField = [APN]
bField = [SHP_Acreage]

If (i = 0) Then
Set d = CreateObject(â??Scripting.Dictionaryâ??)
End If
If (d.Exists(CStr(sField))) Then
iDup = 1
Else
d.Add CStr(sField))), 1
iDup = 0
End If
i = i + 1

Outcomes