OR()
Returns a Yes/No expression as follows:
TRUEif any condition isTRUEFALSEif all conditions areFALSE
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(..., ..., ...)returnsTRUE(grants access) if any of the conditions areTRUE.AND((TIMENOW() >= "9:00 AM"), (TIMENOW() < "5:00 PM"))returnsTRUEif 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"})returnsTRUEif the current weekday is either Saturday or Sunday. Alternatively:OR((WEEKDAY(TODAY()) = "Saturday"), (WEEKDAY(TODAY()) = "Sunday")).IN(USEREMAIL(), ...)returnsTRUEif 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 theUserstable.
See also: AND() , HOUR() , IN() , SELECT() , TIMENOW() , TODAY() , USEREMAIL() , WEEKDAY()
Syntax
OR(condition1, condition2, [condition3 ...])
condition-Yes/Noexpression that results inTRUEorFALSE. At least twoconditionvalues are required.