4 Replies Latest reply on Mar 31, 2011 10:33 AM by Kat11_1

    Showing name of the user logged in in more than one window

    Kat11_1

      Title

      Showing name of the user logged in in more than one window

      Post

      I have a field [User Name] which shows the name of the user that is logeed on.

      This works on the 1st layout that I created.

      If I open another window with the same layount the field only diisplays "0"

      I would like to shaw the name of the user logged in and current date and time at the bottom off most every user facing layout. How do I go about that?

      Thanks for your help.

      Kataraina

        • 1. Re: Showing name of the user logged in in more than one window
          philmodjunk

          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:

          Get (UserName)

          Should always display the current user name.

          • 2. Re: Showing name of the user logged in in more than one window
            Kat11_1

            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.

            • 3. Re: Showing name of the user logged in in more than one window
              philmodjunk

              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.

              • 4. Re: Showing name of the user logged in in more than one window
                Kat11_1

                Thank you using calcualtion with global storage fixed it.