Skip to main content
joshf713
August 30, 2022
Question

Best way to store Audit Fields

  • August 30, 2022
  • 11 replies
  • 0 views

Hello Community,

It has been a standard for a while to store usernames in audit fields in Appian apps. A while back Appian added the ability for users to change their username.

I am just looking to see if this changed your approach for audit fields.

11 replies

stefanhelzle0001
August 30, 2022

Waking the sleeping dog ???

As the username is the only value to identify a user, I would not change that pattern.

joshf713
joshf713Author
August 30, 2022

I agree, no reason to make things more complicated than they should be. But unfortunately we don't always get to make the final decision. Humor me and lets go down this path with the idea that the product owner is determined to have the ability to change a user name.

csteward
August 30, 2022

For this reason, and best data practice, we use an "Employee ID" value for any piece of data associated with a user account.  This ID is essentially the HR identifier for all employees in the company, and will never change.  Usernames that can change are not appropriate for identifying employees/users.  

We load this into our Custom Field 1 on the user profile and in our MSSQL "Users" data - any views to retrieve audit data / history are joined from the application data's Employee ID value to the Users data for real-time account information.

I highly recommend synching Appian user profile data to your database, in a "Users" table, this is invaluable for reporting, etc - if anyone has not done so yet.

stefanhelzle0001
August 30, 2022

My clients typically sync their users from active directory. This way, storing the username as an audit field is also save.

joshf713
joshf713Author
August 30, 2022

Is it safe? When the change occurs are you able to even know about it? For example a common use case could be someone's user name is based on their real name (first.last) and then they get married and change their legal last name. When AD makes the change now all the audit fields in your system have usernames for a user that doesn't even exist anymore. Furthermore you have no way to link them back together.

Again maybe (hopefully) I am missing something with the approach. 

joshf713
joshf713Author
August 30, 2022

Also Appian does give us a nice UUID for the user object. Which when I saw this made me think it could be an easy swap from username to uuid. The problem their is that as far as I can tell, there is no way to convert from UUID to users. 

stefanhelzle0001
August 30, 2022

This is an interesting conversation, but do we ask the right question here? If our client decides to rename user accounts, they will loose track of that users activity in many places. That is at least my assumption. Now, why do I need to somehow try to mitigate this issue in Appian?

I understand that there are situations in which we might have to take care of this. I never had a client asking for this.