I'm kind of new to this, but kind of not. I just don't use it as often as I would like in some cases. With that out of the way here's what I'm attempting to do.
I have two tables that I am working with 1) Manhole Table 2) Gravity Mains Table. The important rows for this script are in the manhole table: INVERTELEV (invert elevation) and FACILITYID (an identifier). From the Gravity Mains table there are 2 important rows: FROMMH (this will be a manhole Facility ID #) and UPSTREAMIN (the upstream invert of the gravity main).
What I am attempting to do is with all the Gravity Main FROMMH values in a list take each value from that list and compare it to a value in the Manhole table FACILITYID field until I find a match. When I find a matching value I want to copy the value in the INVERTELEV field from the manhole table and update the UPSTREAMIN value in the Gravity Mains table. It seems simple enough, but I think I'm making this more complicated than it has to be and I'm confusing myself with nested loops.
I've attach a python file that I'm working on with some notes. Any help on how to do this would be greatly appreciated.
FYI, one thing I am kind of unclear about is with the Update cursor. Does this UpdateCursor object update the data at the current position, meaning the current row it's working on. What exactly does that mean? Does it mean that if I find the row with the matching FACILITYID and FROMMH that when I go to use the row.SetValue() method it will update that row. That's what it sounded like when I read it, but I'm just trying to clarify. I know I could probably setup a sample to test this, but I figured I might as well ask while I'm posting this request for help.
Thanks