Cheat Sheet

Named scope for repeated lookup

With & Sequence

FORMULA
With({Mgr: LookUp(Employees, Name = "Michael Smith")}, Mgr.Email & " - " & Mgr.Department)
EXAMPLE EXPLANATION
First looks up the employee record where Name is "Michael Smith" and stores it in a temporary variable called Mgr, then combines that record's Email and Department fields into a single text string separated by " - " β€” using With() to avoid running the same LookUp() twice.

Safe Patch with error notification

Error Handling & Branching

FORMULA
IfError(Patch(Employees, LookUp(Employees, Email = "xyzz@contoso.com"), {Salary: Value(SalaryInput.Text)}), Notify("Update failed", NotificationType.Error))
EXAMPLE EXPLANATION
Attempts a Patch and shows an error notification if the operation fails, e.g. due to invalid input.

Department color switch

Error Handling & Branching

FORMULA
Switch(Department, "IT", "Blue", "HR", "Green", "Finance", "Orange", "Sales", "Purple", "Gray")
EXAMPLE EXPLANATION
Returns a color-name string based on Department, with a Gray default for unmatched values.

Coalesce manager fallback

Error Handling & Branching

FORMULA
Coalesce(Manager.Text, "Unassigned")
EXAMPLE EXPLANATION
Returns Manager, or the text Unassigned if Manager is blank.

Domain match check

Error Handling & Branching

FORMULA
IsMatch(First(Employees).Email, "^[^@]+@contoso\.com$")
EXAMPLE EXPLANATION
Uses a custom regular expression to verify Email belongs to the contoso.com domain.

Third employee alphabetically

Record Selection

FORMULA
Index(SortByColumns(Employees, "Name", SortOrder.Ascending), 3)
EXAMPLE EXPLANATION
Returns the 3rd employee record when sorted alphabetically by Name.

Most recently joined employee

Record Selection

FORMULA
Last(SortByColumns(Employees, "JoiningDate", SortOrder.Ascending))
EXAMPLE EXPLANATION
Returns the record of the most recently joined employee.

Top 3 earners

Record Selection

FORMULA
FirstN(SortByColumns(Employees, "Salary", SortOrder.Descending), 3)
EXAMPLE EXPLANATION
Returns the 3 highest-paid employee records.

First active employee found

Record Selection

FORMULA
First(Filter(Employees, IsActive = true))
EXAMPLE EXPLANATION
Returns the first active employee record encountered.

UpdateIf resetting notes for a department

Advanced SharePoint CRUD

FORMULA
UpdateIf(Employees, Department = "Marketing", {Notes: ""})
EXAMPLE EXPLANATION
Clears the Notes field for every employee in the Marketing department.

Patch using a record variable built with Set

Advanced SharePoint CRUD

FORMULA
Set(varNewEmployee, {Name: "New Hire", Department: "IT", Salary: 52000, IsActive: true}); Patch(Employees, Defaults(Employees), varNewEmployee)
EXAMPLE EXPLANATION
Builds the new record in a variable first, then patches it into the data source, useful for reuse across multiple buttons.

Split name into table

Advanced Text Processing

FORMULA
First(Split(Trim(Email.Text), " ")).Value
EXAMPLE EXPLANATION
Trims extra spaces from Email, then splits it into a table of individual name-part strings.
Showing 121 – 132 of 132 formulae