Referencing a Last Updated By Field

Hello,

I have two fields in my fom: “HoldStatus” and “LastUpdatedBy”.

With formula language I would “LastUpdatedBy” to update only when the value in “HoldStatus” is updated. “LastUpdatedBy” will hold the name of the user who last made an update to the “HoldStatus” field.

Matthew

Subject: Referencing a Last Updated By Field

Basically, you need to track the value of the HoldStatus field between saves. Typically, this is done bystoring the value in a globally declared LotusScript variable when the document is opened (PostOpen event) and then in the QuerySave event, compare that stored value to the current value in the HoldStatus field. If different, add the name of the current user to the LastUpdatedBy field (or simply replace - not sure if you need a history of “updaters” or not).

One thing to consider too is that if a user opens the document, makes a change to HoldStatus, saves the document, then changes HoldStatus back to what it was originally, and saves it again, how do you want to handle this situation?

Subject: RE: Referencing a Last Updated By Field

I do not need a history of users. Good question.

In regards to your last scenario since the user would be the same regardless of how many times they changed ‘HoldStatus’ I’d be happy just keeping their name in the field. I’m not too swift with LotusScript but this has given me a nice starting point.

Thank you, Cesar.

Subject: RE: Referencing a Last Updated By Field

Yes, but in the scenario I described, the user has effectively not changed the value of HoldStatus and yet his/her name would be listed as the last updater. Sometimes, this type of code is better executed in the QueryClose, when you know the user has finished working with the document, than with each save. Just something to consider.