Chapter 8. Taming the Elusive Calculated Column—Logic Functions
One of the more common frustrations for users new to working with formulas in SharePoint is the usage of logical functions. Throughout this chapter, my hope is that I can help alleviate some of the confusion in how they work, how to use them, and where they can be of benefit in your lists and libraries by working through a few examples that detail the “logic” behind the formula. Each function has a purpose, and although the logic involved can become confusing at times with complexities needed to build robust solutions, I’m going to break each one down with an explanation of how they all fit together, and why.
The Functions
The logical functions include the following individual functions:
- IF
Returns different values depending on whether a condition specified evaluates to TRUE or FALSE.
- AND
Returns a value of TRUE if all arguments in a statement are TRUE. If one or more arguments are FALSE, the entire statement is FALSE.
- OR
Returns YES if any argument is TRUE and NO if all arguments are FALSE.
- NOT
Reverses the value of its argument. Used in cases where you want to test whether a value is not equal to another value.
- TRUE
Returns the logical value TRUE (used primarily for compatibility with other programs; you can also enter the value TRUE directly into your formulas when a requirement exists to test for the TRUE value).
- FALSE
Same as TRUE, but returns FALSE.
In this chapter, I will be detailing the usage of IF, AND, and ...
Get SharePoint 2010 at Work now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.