amneo
May 9, 2020, 3:08am
1
To get the value such as CurrentUserName() . Do we only need to define it in Auto-Update Value ? or we need to configure any other field too ?
During Insert of some records, it do capture the value of CurrentUserName(), but on some instances it captures a NULL value.
Any pointers, why would it do so ?
arbei
May 10, 2020, 12:42am
2
If you have enabled User Table (see the topic Security Settings in the help file), and the user is logged in, CurrentUserName() will return the user name. (Hard coded administrator does not have user name.)
amneo
May 10, 2020, 9:43am
3
Yes i have enabled user table.
The edit and add page is only allowed to authenticated users.
Despite all above the value of CurrentUserName() is captured NULL in database, sometimes.
Insert the following code in “Row_Inserting” and/or “Row_Updating” server event:
$rsnew[“YourFieldName”] = CurrentUserName(); // adjust YourFieldName to your actual field name