OR()

Are any true?

Returns a Yes/No expression as follows:

  • TRUE if any condition is TRUE
  • FALSE if all conditions are FALSE

Sample usage

OR(FALSE, FALSE) returns FALSE

OR(FALSE, TRUE) returns TRUE

OR(TRUE, FALSE) returns TRUE

OR(TRUE, TRUE) returns TRUE

OR(([_THIS] < -2), ([_THIS] > 2)) returns TRUE if the _THIS column value is outside the range of -2 to 2.

OR(([Color] = "Red"), ([Color] = "Yellow"), ([Color] = "Green")) returns TRUE if the Color column value is any of Red, Yellow, or Green. Equivalent to IN([Color], {"Red". "Yellow", "Green"}). See also: IN()

Allow access

Allow access, such as to a view (by Show if), column (by Show_If), or table (in an Are updates allowed? expression) by time of day, day of week, or if the app user has special access:

OR(
  AND((TIMENOW() >= "9:00 AM"), (TIMENOW() < "5:00 PM")),
  IN(WEEKDAY(TODAY()), {"Saturday", "Sunday"}),
  IN(
    USEREMAIL(),
    SELECT(Users[Email], [Special Access?], TRUE)
  )
)
  • OR(..., ..., ...) returns TRUE (grants access) if any of the conditions are TRUE.
  • AND((TIMENOW() >= "9:00 AM"), (TIMENOW() < "5:00 PM")) returns TRUE if the current time is between 9:00 AM and 5:00 PM. Alternatively: IN(HOUR(TIMENOW() - "00:00:00"), {9, 10, 11, 12, 13, 14, 15, 16}).
  • IN(WEEKDAY(TODAY()), {"Saturday", "Sunday"}) returns TRUE if the current weekday is either Saturday or Sunday. Alternatively: OR((WEEKDAY(TODAY()) = "Saturday"), (WEEKDAY(TODAY()) = "Sunday")).
  • IN(USEREMAIL(), ...) returns TRUE if the current user's email address occurs in the specified list.
  • SELECT(Users[Email], [Special Access?], TRUE) provides a list of unique email addresses who are to be granted special access according to the Users table.

See also: AND(), HOUR(), IN(), SELECT(), TIMENOW(), TODAY(), USEREMAIL(), WEEKDAY()

Syntax

OR(condition1condition2, [condition3 ...])

  • condition - Yes/No expression that results in TRUE or FALSE. At least two condition values are required.

See also

AND()

NOT()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
16435772775202401944
true
Search Help Center
true
true
true
false
false