This topic is locked

Insert user name into a record

2/18/2026 15:18:40
General Tips and Tricks
S
Simtrain author

I have a username field in all my tables, and when the logged on user edits or adds a record I would like that users name to be inserted into added/edited record. I know to use before add or before edit, but nothing I do seems to work.

Any help will be gratefully recieved.

Steve

Tandy 2/18/2026

In Events - Global Pages - Login Page - After Successful Login
Put in your session like this:
$_SESSION["UserName"] = $data["username"];

Then in your Fields - Whatever table for your Username field click on Properties Box Pick Readonly Then in the Default value use $_SESSION["UserName"] Or click on the ... and in drop down at the top pick Username and it marks it for you. Same for add and edit.