This should be fairly simple but something quirky is going on with my script and I need an extra pair of eyes. I thought as long as a value is saved in the back-end then it should be displayed in the front-end once refreshed. This seems to work sometimes (eg. a recently opened document) but not always. Going through the debugger, I see the value is changed and saved in the back-end but the refresh then overwrites the saved value with the original front-end value. No values are being updated in the front-end anywhere in this script. I’ve tried using reload but to no avail.
I’ve posted a snippet of my code below. this is executed from a button in a document displayed in edit mode. ‘Doc’ represents the document being displayed:
if subj.SubjCount(0) = subj.SubjRecdCount(0) Then
'Then we know that subjcount is not 0 from the previous test and the same number of date stamps have been checked as subjectivities so we can mark as complete
Call subj.MakeResponse(doc)
Call subj.Save(True, True)
Call doc.ReplaceItemValue("SubjPending" & n, "")
Call doc.ReplaceItemValue("SubjCompDate" & n, compDate.DateOnly)
Call doc.Save(True, False)
Call uidoc.Refresh
Exit Sub
End If
Appreciate any suggestions!
Tina