Read Only Table

Easy 2 min setup No componentsscrTableReadOnly
Download .msapp

The baseline: a gallery laid out as a table, with sortable headers, a search box, multi-select status chips and a category dropdown. Every filter and sort is written so SharePoint runs it, so it keeps working past 5,000 rows.

Best for: Any list people browse and open. Start here and add the technique you need from the other patterns.

Two parts to paste. The Screen YAML and the App.Formulas. The formulas are the same for all ten patterns, so an app with several of them needs that block once. Without it the screen has no colours, sizes or sample rows — or download the .msapp to skip the paste.

Preview and code

Wireframe — screenshots coming soon

Sortable headers

Click a header to sort, click again to reverse

Search

Title or item key, matched from the start

Status chips

Pick any combination of statuses

Category filter

All categories sends no condition at all

Empty state

Says nothing matches, with a button to clear the search and filters

Row opens the item

A swap point for your details screen

How it works

The 3 techniques that make this pattern work on a list big enough to matter.

1

One literal SortByColumns per column

A sort column held in a variable does not delegate, so the header sets locTroSortBy and a Switch picks one hard-coded SortByColumns per column.

Switch(locTroSortBy,
    "Owner",   SortByColumns(src, "Owner", ord),
    "DueDate", SortByColumns(src, "DueDate", ord),
    SortByColumns(src, "Title", ord))
2

Multi-select status without in

StatusKey in selected does not delegate. Statuses are a small fixed set, so each chip is a boolean and the filter is an Or of equalities, each switched on by its chip.

!(locTroF1 || locTroF2 || locTroF3 || locTroF4)
|| (StatusKey = "NotStarted" && locTroF1)
|| (StatusKey = "InProgress" && locTroF2)
3

All categories sends no condition

Comparing a column with a blank or empty key filters on blank and returns nothing. The category narrows the result with an If outside the query, and the test is IsBlank, which covers both blank and empty.

With({ cat: drpTroCategory.Selected.Key, base: Filter(...) },
    If(IsBlank(cat), base, Filter(base, CategoryKey = cat)))

Connect to SharePoint

It ships on sample rows. The queries are already written the way SharePoint needs, so switching is a rename rather than a rewrite.

  1. Add your list as a data source.
  2. In galTroRows.Items, replace colTblItems with your list (the src: Filter(colTblItems, ...) inside the With).
  3. Delete nfSeedTblItems(); from the screen’s OnVisible.
  4. If your columns are named differently, rename them in the screen, or add matching columns to the list.
  5. Index these columns: Title, ItemKey, StatusKey, CategoryKey, Owner, Amount, DueDate.

Specific to this pattern

Search is StartsWith, not contains: in and Search() do not delegate on SharePoint.

The count reads the rows loaded. The gallery pages in as it scrolls, so it is labelled loaded rather than total.

The columns the patterns read

ColumnTypeUsed for
TitleTextThe item's name; searched and sorted
ItemKeyTextA unique reference, e.g. ITM-0042; searched, and the selection key
OwnerTextWho the item belongs to
OwnerEmailTextThe owner's email
StatusKeyTextNotStarted, InProgress, OnHold or Completed
CategoryKeyTextA key from nfTblCategories
PriorityKeyTextHigh, Medium or Low
AmountNumberA money value
DueDateDateWhen it is due; overdue rows turn red
CreatedDate and timeBuilt in on a SharePoint list

Rules that keep it working past 5,000 rows

  • Every filter on a growing list must delegate: equality on an indexed column, StartsWith on text, and And or Or of those. in, Search() and <> do not delegate on SharePoint.
  • An "All" choice must send no condition. Put the If outside the Filter and test the key with IsBlank, never with = "": a blank key compared with a column filters on blank and returns nothing.
  • Sort with one literal SortByColumns per column. A column name held in a variable does not delegate.
  • Index every column you filter or sort on before the list passes 5,000 items. Past that, SharePoint refuses an unindexed filter or sort outright.
  • CountRows, Sum and Average do not delegate. Show rows loaded rather than a total, or keep totals in a list a scheduled flow maintains.

Get new components and templates when they drop

One email when something new ships. Unsubscribe anytime.

Community

Use the toolbar to format · or type markdown directly