I have a perspective view with a dropdown list that I have assigned to a tag (NewState) and is set to historical which is connected to my Canary Labs Historian. I want to capture the current, logged in user (session.props.auth.user.userName), into another tag (stateChangedBy) when the user has chosen a new value from the dropdown list. Essentially, I am trying to capture who changed the the (NewState) tag in my historian. I have verified that session.props.auth.user.userName gives me the user data I want, and the tag value change from the dropdown list to be trigger of writing the user name to my (StateChangedBy) tag. Additionally, I would like to show the new state value and who changed it in my historical table, which should be good to go when I get the first part working. Any help would be much appreciated, thank you for your time!
Thank you for the quick reply. After reading up about the Audit Log, the user's name that changed the dropdown list tag must also go into my Canary data historian, which I am reading back in my historical table shown. Although I am showing the historical machine state and state changed by in Ignition, there are other audiences that need the data outside of ignition, direct from the Canary Historian through it's visualization web app, Axiom.
The audit log will capture the user as actor. When you create an audit profile, you chose which database the information is stored in. I'm not 100% sure, but you should be able to select Canary as your database target.
Unfortunately Canary is not an option for an audit log target, because it is time-series and not relational. I have the trigger in place for the drop down and is wiritng to StateChangedBy tag, but I cannot get it to populate with the session.props.auth.user.userName value. I'm sure it's my syntax....