Is the found set of records that you want to loop through on Main or Export? It looks correct for looping through a found set on Main.
But perhaps the script is stripping script triggers, such as OnLayoutEnter or OnLayoutExit on either Main or Export that perform scripts that interfere with the execution of your script.
I believe your Loop step and GoToRecord step should be at the beginning of your script. Otherwise as it stands now the SetField steps in your loop are using the same variables for each new record in the second table.
Thank you for both responses.
For PhilModJunk: the records I want to loop through are on Main.
For Rick: Moving the Loop set and GoToRecord steps above the Set Variables commands what was necessary. The loop now performs correctly.
Thank you again.