Editable Table

Easy 2 min setup No componentsscrTableEditable
Download .msapp

Inline editing: text, number and status cells edit in the row, changed rows are tinted, and one Save writes them all. Discard puts everything back. It runs on the same seeded rows as the other patterns, keyed by ItemKey, so nothing is written until you Save.

Best for: Quick bulk corrections where opening a form per row would be slow.

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

Inline cells

Text, number and a status dropdown in the row

Dirty tracking

Changed rows are tinted and counted

Save and discard

Write every change at once, or drop them

Filters

Search, status chips and category, as on Read Only

How it works

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

1

Edits are held, not written

Each change goes into colTedEdits keyed on the row, and the cells read the edit when there is one. Nothing touches the source until Save, so Discard is a Clear.

With({ e: LookUp(colTedEdits, ItemKey = ThisItem.ItemKey) },
    If(IsBlank(e.ItemKey), ThisItem.Title, e.Title))
2

A dropdown Default must be a record from its Items

The status cell's Default looks the value up in the same table its Items use, preferring a pending edit, so the dropdown shows what the row will save as.

LookUp(nfTblStatuses,
    StatusKey = Coalesce(LookUp(colTedEdits, ItemKey = ThisItem.ItemKey).StatusKey, ThisItem.StatusKey))

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 colTblItems, replace colTblItems with your list (The same sample rows as the other patterns; Save patches them).
  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, StatusKey, CategoryKey.

Specific to this pattern

Point Save at your list with one Patch of the whole edits table, which SharePoint takes as a batch. The drafts hold ItemKey, Title, StatusKey and AmountText: Patch(YourList, ForAll(colTedEdits As e, { ID: LookUp(YourList, ItemKey = e.ItemKey).ID, Title: Trim(e.Title), StatusKey: e.StatusKey, Amount: Value(e.AmountText) })).

Two people editing the same row: the later Save wins. If that matters, compare the row's Modified before saving.

If a workflow owns some columns, keep those cells read only here and change them through that workflow instead.

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