Need to set a flag with notesuidocument.save command

I am coming in behind someone else’s code and simply need to set a flag for a notesuidocument.save command. How can I do this? Here’s an excerpt from the code that exists today:

	Select Case action

	Case "Approve"

		scrDoc.Task_Action = ""		'reset Task_Action field

		Call uidoc.Reload

	Case "Reject"

		scrDoc.Task_Action = ""		'reset Task_Action field

		Call uidoc.Reload

	Case "Cancel"

		scrDoc.Task_Action = ""		'reset Task_Action field

		Call uidoc.Reload

	Case "Un-Cancel"

		scrDoc.Task_Action = ""		'reset Task_Action field

		Call uidoc.Reload

	Case Else	'Complete has no corresponding Task_Action value. The Task form isn't in edit mode

		Call WriteLogFromAgent ( scrDoc, "15", userName ) ' 15 is task Complete

		Call uidoc.reload

		Call uidoc.FieldSetText("Task_Complete","Complete")

		Call uidoc.FieldSetText("Task_CompletedDate", Cstr(Today()))

		Call uidoc.FieldSetText("Task_CompletedBy", username)	

	End Select

	

	Call uidoc.refresh

	Call uidoc.save

	Call uidoc.close

Subject: Need to set a flag with notesuidocument.save command

Dim workspace As New NotesUIWorkspaceDim uidoc As NotesUIDocument

Set uidoc = workspace.CurrentDocument

set uiDoc = uidoc.FieldSetText(“flag”, “1”)

call uiDoc.save();

Subject: RE: Need to set a flag with notesuidocument.save command

Please forgive me for not being more clear. I need to set a flag (variable) to determine if the save was successful or not.