I have a field in each table in my NetTalk Server app called “UpBy”. It’s a string field of 200 characters. I want to be able to put some text in it that indicates who inserted or updated it, assuming they made a change and didn’t just view it. Something like
DonnEdwards 2021-04-17 23h08 Add 126.96.36.199
Firstly, where do I initialise a session variable “UserName” to read “Not Logged In”? Once the user logs in I will change it to the actual user name.
Secondly, where do I put the code to generate the string, assuming I want this string to be the session variable “UserName” followed by the date and time, followed by the word “Add” or “Change”, followed by the user’s IP address?
Thirdly, how do I detect whether the record is being inserted or updated? Also, how do I avoid changing the field if the record hasn’t been modified?
All suggestions, ideas and tips will be most welcome. I’m still busy with RTFM, so please forgive me if this is discussed in the documentation. Just point me to an example or section of the notes.