I have a form that contains a “status” field which records various stages of approval for a document. Once the document has been updated to “approved” status it doesn’t allow any additional changes. I am trying to setup a button in a view that will change the status field to “amended” on the selected document and compose a response document that carries over the pertinent fields. I have been using this simple piece of code to accomplish that aspect.
FIELD Status:=Status;
@SetField(“Status”; “Amended”);
@Command([Compose]; “”; “MainR”)
My problem is should someone decide to cancel the amended document without saving, the status of the main document will still read “amended”. Is there some way I can set it up to reset the status field to its original value if they decide to cancel? I already have buttons on the form that force the user to use either a save/cancel button.
Thanks