IF(TRUE, "Yes!", "No!") : Yes!
IF(FALSE, "Yes!", "No!") : No!
IF((1 > 0), "Yes!", "No!") : Yes!
IF((1 < 0), "Yes!", "No!") : No!
IF(ISBLANK(""), "Yes!", "No!") : Yes! See also: ISBLANK().
IF(([Date] = TODAY()), TRUE, FALSE) : Returns TRUE if the Date column value matches today's date; otherwise, returns FALSE. Equivalent to
([Date] = TODAY()). See also: TODAY().
IF(USERSETTINGS("Names in uppercase?"), UPPER([Name]), [Name]) : Returns the Name column in all uppercase letters if the value of the Names in uppercase? user setting is TRUE; otherwise, the Name column value is returned unchanged. See also: UPPER(), USERSETTINGS().
IF(ISNOTBLANK([Phone Number]), [Phone Number], "(no phone)") : If the Phone Number column value isn't blank, the column value itself is returned; otherwise, the text, (no phone), is returned.
IF(ISNOTBLANK([Customer].[Discount Rate]), ([Price] * [Customer].[Discount Rate]), [Price]) : If the customer has a discount, the discounted price is returned; otherwise, the original price is returned.
"not leap year"
TODAY()gives today's date.
YEAR(...)gives the year of the given date.
"2/28/" & ...constructs a Text value in MM/DD/YYYY-format date for February 28 of this year.
DATE(...)declares the constructed Text value a Date value.
DATE(...) + 1adds one day to the given date.
MONTH(...)gives the month number of the computed date, 1 to 12, where 1 is January and 12 is December.
((...) = 2)asks whether the month number is 2 (February).
IF(..., "leap year", "not leap year")gives leap year if the day after February 28 of this year is in February, or not leap year if not.
Weekday or Weekend?
"It's the weekend!",
"It's a weekday."
TODAY()gives today's date.
WEEKDAY(...)gives the weekday number of the given date, 1 to 7, where 1 is Sunday and 7 is Saturday.
LIST(1, 7)constructs a list of two numbers: 1 and 7.
IN(..., ...)asks whether the computed weekday number is present in the constructed list.
IF(..., "It's the weekend!", "It's a weekday.")gives It's the weekend! if the the weekday number is 1 or 7, or It's a weekday. otherwise.
IF( is-true? , then-do-this , else-do-this )
- is-true? (Yes/No): An expression that returns TRUE or FALSE.
- then-do-this : An expression to be evaluated only if the is-true? expression evaluates as TRUE.
- else-do-this : An expression to be evaluated only if the is-true? expression evaluates as FALSE.
Both then-do-this and else-do-this should produce results of comparable types (e.g., both textual, or both numeric). The results may both be single values or lists.
If is-true? evaluates as TRUE, the result of evaluating then-do-this is returned; otherwise, the result of evaluating else-do-this is returned.