Thank you for your post.
The calculation for "getusername" is correct, but you will need to make this unstored. That is, in Manage Database, select "getusername", and in the bottom right area, click "Options...". The "Specify Calculation" window appears with the calculation. In the bottom right area, click "Storage Options...", and under Indexing, enter a check mark next to "Do no store calculation results -- recalculate when needed".
Let me know if you need additional clarification.
A picky, but important quibble. GetUserName returns the USER name not the account name. The Account Name calculation field is the one that needs to be set to unstored to show the account name.
Account names and user names are often the same for a given user, but they are not really the same. User names are specified in preferences and account names are defined in Manage | Security.
The account name can also be displayed on a layout using layout text via a menu option you can select from the Insert Menu while in Layout mode.