Examples

OR(FALSE, FALSE) : FALSE

OR(FALSE, TRUE) : TRUE

OR(TRUE, FALSE) : TRUE

OR(TRUE, TRUE) : TRUE

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

OR(([Color] = "Red"), ([Color] = "Yellow"), ([Color] = "Green")) : 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, e.g. 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( condition1 , condition2 ... )

Arguments

condition (Yes/No): An expression that results in TRUE or FALSE. At least two conditions are required.

Return Value

Yes/No: TRUE if any condition is TRUE, otherwise FALSE.

See Also

AND(), NOT()

Did this answer your question?