Bulk Table Edit

My current movie ratings are from 1-10 stars. I would like to halve the ratings to 1-5 stars. Essentially, I want to bulk edit the table and replace the rating with Round(currentRow.Rating / 2).

Since column formulas cannot have side effects, but buttons can, the most obvious way to do this in my mind is to create a single use button that sets the rating to half its value. Unfortunately, I have not figured out how to refer to the “currentRow” in the “Update Values” section of the button.

Hey! This thread should be relevant:

Short answer: you do this by either:

  • making a button column where each button modifies thisRow.Rating, then one button that presses all the buttons in the column, then delete the column.
  • or use FormulaMap in your single use button to iterate over each row and modify, e.g.
Movies.FormulaMap(
  CurrentValue.ModifyRows(Movies.Rating, Round(CurrentValue.Rating / 2))
)

There’s also a way without buttons, but it’d take much longer, so just do the FormulaMap as the fastest one.