Please describe how you've define that field. Is it a calculation field? What return type?
And how you go about opening the new window (Script? Manually from the window menu?)
A calculation field set to return text with global storage specified and using this expression:
Should always display the current user name.
Field is defined as a a calcualtion using Get (User Name) return type is text.
If I put the field content in the Global field it will display in all of the layouts I put it it on as a Global field. Insert user name symbol also works on all the layouts I put it on.
But the layout (Main) on which I put the original User Name field only displays it the 1st time it is opened. (on open script generates it). If I open a new window manually (same layout) the User Name shows 0. If I have a script open another window (from a difrenet layout) and than I go back to that original layout (Main) in the 2nd window the user name is 0.
I actually described using a calculation with global storage enabled rather than using a script to store the user name in a global field, but that should work also.
If you change your calculation's storage options to Unstored, it should work on any layout based on the same table as where you defined the field. If you specify that the calculation be Global, you should be able to use it on all layouts in the same file. New windows should show the same results.
I can't come up with any way to see a 0 instead of the UserName. If the field is stored, it will fail to update and a zero found set will leave this field blank, but I can't come up with a way where it returns a zero.
Thank you using calcualtion with global storage fixed it.