July 19, 2024

Welcome to Function Friday. This week we’ll explore Microsoft’s SharePoint List Function “OR” function. This function will return Yes if any of the arguments are True. If any of them are False, it will return No

Limitations

  1. Max 30 conditional values

Arrays

  1. OR operations can be performed in bulk if you have an array with elements. For example, =OR({TRUE, FALSE}) will return Yes
  2. You can’t perform operations within the array-like =OR({TRUE,1=1})or nest them =OR({TRUE,OR({TRUE,1=1})})

References

  1. References to tables can also be evaluated like =OR([isActive])
  2. You can combine references like =OR([isActive], True). []identify the reference to the table, but they are not necessary if the name doesn’t contain spaces. So you can write the same formula like =OR(isActive, True)

Text

  1. OR is case insensitive, so OR("TrUe") or OR("True") is evaluated to Yes
  2. ORis language-specific, so OR("Falso")(False in Portuguese) will return the “#Value!” error.

Operations

  1. You can do =OR(1=2) where you can define the comparison that you want like <, >, <=, >= or <>
  2. Arithmetic operations are also possible like OR(1+1=2)
  3. You can nest like =OR(1<2,OR(1<2,TRUE))
  4. You can combine with other operators like AND=OR(1<2,AND(1<2,TRUE))

Recommendations:

  1. Avoid complex formulas. In the end. If you get a “#Value!” error, it will be hard to debug what is the condition that is generating the error.
  2. If possible, test the conditions one by one to see if you’re getting the desired results. Only after you’re sure that all of them are correct,  join them into a big list of conditions. By doing this, you are sure that each of them is returning the desired value.
  3. I recommend no more than ten conditional values. Although SharePoint supports up to 30, it will become an unmanageable mess to debug complex formulas.

Sources:

Microsoft’s Reference

Back to the SharePoint’s list formula reference.

Featured Image by Kevin Butz on Unsplash

Manuel Gomes

I have 18 years of experience in automation, project management, and development. In addition to that, I have been writing for this website for over 3 years now, providing readers with valuable insights and information. I hope my expertise allows me to create compelling, informative content that resonates with the audience.

View all posts by Manuel Gomes →

Leave a Reply

Your email address will not be published. Required fields are marked *

Mastodon