0
votes

I am migrating from Lotus Notes to SharePoint. I am trying to define a Lotus Notes formula to match records to migrate. I am a Lotus Notes noob. What is the not equal operator in Lotus Notes and what is the AND operator. This is what I have:

Form!="Credit Hold Secured" AND Form!="Credit Card" AND @Matches(@Left(CompanyName;1);"{0-9}")

2

2 Answers

1
votes

To combine conditional statements or formulas that return a true/false (boolean) value, use the ampersand to specify "AND", the pipe to specify "OR", and the exclamation point to specify "NOT":

Form != "Credit Hold Secured" & Form != "Credit Card" & @Matches(@Left(CompanyName;1);"{0-9}")

Note, a slightly cleaner way to check for a matching form name is:

@IsNotMember(Form; "Credit Hold Secured":"Credit Card")

Which will return true if the form name is not in the list of string values. That makes it easier to add a new form to that list in the future.

2
votes

An even more concise way than the one given by @Ken is

(!(Form = "Credit Hold Secured":"Credit Card")) & @Matches(@Left(CompanyName;1);"{0-9}")

This takes advantage of the fact that a comparison between a scalar value and a list will return @True if the scalar matches any value in the list. I like this format because it reads very simply as "Not form = X or Y" (interpreting the ":" as an OR, which it effectively is in this syntax), and by De Morgan's law (and with a bit of a slip out of formal notation into plain language) this is equivalent to "Form != X and Form != Y".