Hello,
I have the following code in the QuerySave event of a form (SendTo is a text field allowing multiple values with comma as seperator and not calculated):
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim stEtat As String, stAutoValid As String, stValideurs As String, stOrdonnateurs As String, stRecipients As String, stPayeurs As String
Dim vRcpt As Variant, vValideurs As Variant, vOrdonnateurs As Variant, vPayeur As Variant
Dim iRcptCount As Integer
Dim nmUser As NotesName
Call Source.Refresh
Set nmUser = New NotesName(Session.UserName)
stEtat = Source.Document.GetItemValue("EtatDemande")(0)
stAutoValid = Source.Document.GetItemValue("AutoValid")(0)
stRecipients = Source.FieldGetText("SendTo")
If stRecipients = "" Then
stRecipients = nmUser.Abbreviated
Else
vRcpt = Split(stRecipients, ",")
iRcptCount = Ubound(vRcpt) + 1
vRcpt(iRcptCount) = nmUser.Abbreviated
vRcpt = Arrayunique(vRcpt, 5)
stRecipients = Join(vRcpt, ",")
End If
Call Source.FieldSetText("SendTo", stRecipients)
Call Source.Document.ReplaceItemValue("EtatDemande", stEtat)
End Sub
There’s no compile/runtime error but the SendTo field remains empty. With the debugger on, I checked that vRcpt and stRecipients are updated correctly, but when it calls FieldSetText, SendTo ain’t updated.