Script Timing

Script Timing

I am having a problem understanding the timing of deluge script execution.

I have a State field and a County field.  Both are dropdowns, and the County list gets populated after the State is selected (via On Update script).  However, I also have a record ID field that will determine the values of the State and County once selected (again via On Update script).

I want to select the ID, have it populate the values of the State and County fields, but also have it populate the County list based on the State field value.  My problem is that even though selecting the ID changes the State and County field values, when the On Update code for the State field runs it does not recognize the County field value (but it does for the State).

I have researched this for several days and cannot figure out why this discrepancy would exist.  Thank you for any help.