You cannot do this with an auto-entered calculation if you expect the field to update to show the current user's account name at all times.
Change this field to one of type calculation instead of text and change it to an Unstored calculation.
And note that if you want to display this name on a layout, you do not need any field at all in FileMaker 12. There's a layout symbol for Account Name that you can use to put the current user's account name on a layout.
1 of 1 people found this helpful
I tried the Field as a Calculated, Gobal, but it never worked.
I have had success with using a layout synbol: Menu Bar - Insert - Other Symbol ... - AccountName
The get(accountname) calculation shows the person who created the record, not the current user and can lead to confusion. For instance, if you add a new field to a record using this calc, then all 20,000 records will show your account name. New records will show the creators name.
Using the symbol to show the account name works, as you noted. This is also a good safety check since an observer could note that the wrong person is using an account name to log in.
I tried using this a color bar on a layout with a different color for each division: bookkeeping, warehouse, sales, etc. to indicate the login. Then someone pointed out that a color blind person could not see the difference.
Not true. Get ( accountName ) shows the current user's account name at the time the calculation evaluates. In a stored calculation, this will be at the time the record is created. But in an unstored calcualtion, this will update automatically to show the current user's account name.
The fact that James tried to use a global calculation field probably kept the field from updating as needed. A regular, but UNSTORED calculation field will stay updated to show the current user's account name and as I previously posted, if this is for display purposes, you don't need to use a calculation of any kind to display this info on a layout.