Question : Error in Lotus Notes Formula

I have a problem with the code below. I have added this piece:

& Risk1 = "Stop" | "Alert"

And it doesnt seem to work properly.

Can anyone help me to tidy up this code. FYI t worked OK before I added this code.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
BodyText := @NewLine +
                    "ACT Information" + @NewLine +
                     "=============" + @NewLine + @NewLine +
				"Zone: "  + Zone + @NewLine +
				"Log Number: " + LogNumber + @NewLine +
				"Reported By: " + ReportedBy + @NewLine +
                    "Reported Date :" + @Text(ReportedDate) + @NewLine + @NewLine;
 
                @If(@IsNewDoc;
@Do(
@MailSend(Notification;"";"";"New ACT for Zone " + Zone + " Risk Category  " + "[" + Risk1+ "]";"A new ACT has been raised in your Zone, Please click on the doc link below to view:";BodyText;[IncludeDoclink]);
@SetField("MailAssign";"Y")
);"");
@If(SignedOff = "Yes" & SignedOff1!= "Yes" & Risk1 = "Stop" | "Alert";@MailSend(@Unique(@Trim("James Smith/GB/HO/DCT"));"";"";"A ACT Report Requires Signing Off";"The corrective actions for the ACT created are now completed, please review and sign off the report. Follow the doc link below to see the document." + @NewLine;BodyText;[IncludeDoclink]);"")

Answer : Error in Lotus Notes Formula

Sure.  You're just using the wrong operator.  In @Formula language, you can't OR together r-values in an expression.  But since @Formula works great with lists, you can switch to the list concatenation operator, and everything should work fine.

& Risk1 = "Stop" : "Alert"
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
BodyText := @NewLine +
                    "ACT Information" + @NewLine +
                     "=============" + @NewLine + @NewLine +
                                "Zone: "  + Zone + @NewLine +
                                "Log Number: " + LogNumber + @NewLine +
                                "Reported By: " + ReportedBy + @NewLine +
                    "Reported Date :" + @Text(ReportedDate) + @NewLine + @NewLine;
                @If(@IsNewDoc;
@Do(
@MailSend(Notification;"";"";"New ACT for Zone " + Zone + " Risk Category  " + "[" + Risk1+ "]";"A new ACT has been raised in your Zone, Please click on the doc link below to view:";BodyText;[IncludeDoclink]);
@SetField("MailAssign";"Y")
);"");
@If(SignedOff = "Yes" & SignedOff1!= "Yes" & (Risk1 = "Stop" : "Alert"); @MailSend(@Unique(@Trim("James Smith/GB/HO/DCT"));"";"";"A ACT Report Requires Signing Off";"The corrective actions for the ACT created are now completed, please review and sign off the report. Follow the doc link below to see the document." + @NewLine;BodyText;[IncludeDoclink]);"")
Random Solutions  
 
programming4us programming4us