SP2013 on prem
I need to record and display the user who performed an action in a form. The action could either be clicking a yes/no check box or a button. I know how to retrieve their display name - userProfileLookup(CurrentUser,"PreferredName")
If I display this in a calculated value it will recalculate each time a different user opens the form. What's the best way to record the name of the user and display it in the form permanently?
Maybe I could have the workflow store the value in a list column, and use a calculated value that has the logic to tell if it should display the current user (when the action was just performed) or the stored user (if the action was previously performed)? Either way I do need the information to be display immediately when the action is performed, as well as on later occurrences of the form being opened.
Firstly, I assume you've consider using the out-of-the-box SharePoint versioning on this and found it not to be sufficient? I assume so if you are wanting to display the information on a form.
Depending on how many controls/columns you have, you could set up a workflow to run on item creation/modification which appends a multi line of text field - in theory, you can use the out-of-the-box append comments features for this and just enter the changes into a build string - this will automatically store the date and name of the user who has made the change. It would however, include a lot of run ifs to build a string to show what has been changed.
I haven't used SP versioning in conjunction with forms and workflows so I'm not sure how that would address the requirement.
I'm going with something similar to what you describe in your second paragraph but a bit simpler. I don't need to record every action taken, just when a couple of specific fields are selected.
Thank you very much for the input!