def conditional(sourceField, Offset): dSum = 0 if Offset > 0: dSum = sourceField else: dSum += sourceField return dSum
conditional(!sourceField!,!Offset!)
Code Block: rec=0 def autoIncrement(): global rec pStart = 1 #adjust start value, if req'd pInterval = 1 #adjust interval value, if req'd if (rec == 0): rec = pStart else: rec = rec + pInterval return rec Expression: autoIncrement()
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.