I use FP 2.6 but don't do what you want to do.
However, I set up my SCXs to automatically intialize all field variables used by the SCX by adding the code to the SCREEN LAYOUT SETUP SNIPPET. I never have errors anymore related to field variables that I forgot to initialize. If I add/delete fields in the SCX, I never need to remember to initialize the variable for that field. And, of course, I never lose the code since I never modify the SPR.
Similarly, you should be able to somehow do what you want to do in the same snippet, although I personally don't know how to make it work.
I would add some of your code to the end of the setup snippet and then play with it to see if you can solve your problem.
mmerlinn
"Political correctness is the BADGE of a COWARD!"