Subject: RE: Block Mail from Sender - Notes Error - Formula Error
This was on the Lotus support site. Looks like it’s fixed in 6.5.1.
Problem
After removing and re-adding an Exception to a mail rule, the following error occurs when you click the OK button:
“Notes error: Formula Error”
Solution
This issue was reported to Lotus software Quality Engineering and has been addressed in the mail template that ships with Notes 6.5.1 as well as the mail template that ships with Notes 6.0.4. The template’s ButtonRemoveCondition subroutine within the Rules script library was modified to fix this issue.
Excerpt from the Lotus Notes and Domino Release 6.5.1 MR fix list (available at IBM Developer):
Design
SPR# MGAN5QKS34 - This fix will reset variable values for a rule after removing exceptions.
Workaround:
The immediate workaround is to rebuild the rule from scratch. To avoid the issue in the future, update the design of the mail file to use the 6.5.1 mail template.
If the 6.5.1 mail template is not available, the administrator could update the 6.0.x or 6.5 mail template’s ButtonRemoveCondition subroutine (within the Rules script library) to the 6.5.1 design. Below is the revised version of the subroutine:
Sub ButtonRemoveCondition()
On Error Goto TrapError
Dim vcondtoremove As Variant
Dim vconditionlist As Variant
Dim vtokconditionlist As Variant
Dim vexceptionlist As Variant
Dim vtokexceptionlist As Variant
Dim functionname As String
functionname = “ButtonRemoveCondition”
vcondtoremove = note.getitemvalue(“conditionListDisplay”)(0)
vconditionlist = note.getitemvalue(“ConditionList”)
vexceptionlist = note.getitemvalue(“ExceptionList”)
vtokconditionlist = note.getitemvalue(“tokConditionList”)
vtokexceptionlist=note.getitemvalue(“tokExceptionList”)
If Not (vcondtoremove = “When:” Or vcondtoremove = “Except when:” Or vcondtoremove = “”) Then 'Prevent from selecting wrong line
For x = 0 To Ubound(vconditionlist)
If x = 0 And x <> Ubound(vconditionlist) And vconditionlist(x) = vcondtoremove Then
vconditionlist(1) = Right$(vconditionlist(1), Len(vconditionlist(1))-Instr(vconditionlist(1)," "))
End If
If vconditionlist(x) = vcondtoremove Then
vconditionlist(x) = “”
vtokconditionlist(x) = “”
Call note.replaceitemvalue(“conditionlist”,vconditionlist)
Call note.replaceitemvalue(“tokConditionList”, vtokconditionlist)
Goto done
End If
Next
For x = 0 To Ubound(vexceptionlist)
If x = 0 And x <> Ubound(vexceptionlist) And vexceptionlist(x) = vcondtoremove Then
vexceptionlist(1) = Right$(vexceptionlist(1), Len(vexceptionlist(1))-Instr(vexceptionlist(1)," "))
End If
If vexceptionlist(x) = vcondtoremove Then
vexceptionlist(x) = “”
vtokexceptionlist(x)=“”
Call note.replaceitemvalue(“exceptionlist”,vexceptionlist)
Call note.replaceitemvalue(“tokexceptionlist”,vtokexceptionlist)
Goto done
End If
Next
done:
End If
Call note.replaceitemvalue(“conditionlist”,vconditionlist)
Call note.replaceitemvalue(“tokconditionlist”, vtokconditionlist)
Call note.replaceitemvalue(“exceptionlist”, vexceptionlist)
Call note.replaceitemvalue(“tokexceptionlist”, vtokexceptionlist)
Call ResetCondition
Exit Sub
TrapError:
Msgbox "Error on " & functionName & " → " & (Err & ": " & Error$)
Exit Sub
End Sub