I was wondering if anyone has ever tried doing this kind of calculation in field calculator, or if it is even possible. What I am trying to do is to calculate an order field, based on repeating polyline IDs. In excel I would do something like "If ID2 = ID1, Order1 + 1, else 1. In essence, the query refers to another column and to itself, and it refers to specific rows, sometimes other than the row being calculated. Is this doable with a VB or Python script?