Button to modify a cell in current row and modify cell in the next row?

How can I create a button that modifies a cell in a current row, then updates a cell in the next row?

before click
Column Status
1 - not started
2- not started

after click
1 - in progess
2- up next

hi, i would have done it that way. but be careful it has to be exactly one above the other.

  • First, add a column to calculate/increment the row order :
// gives the row order
MyTable.find(thisrow)
  • After a button with runAction to perform several actions :
runAction (
// first action update thisrow
ModifyRows(thisrow, column Status, "in progress"),
//second update rowOrder + 1
ModifyRows( MyTable.filter(CurrentValue.rowOrder== thisrow.rowOrder+ 1), column Status, "up next")
)

Hi Ryan

When working with previous and next rows, you need to be very aware of the row sequence in you table.

There are three distinct ways for a table to be ordered:

  1. Row creation sequence.
    This is where the table is ordered by the creation date of the order.
  2. Sorted sequence
    This is where you explicitly sorry the table, either from the columns, or by using the Coda Formula language.
  3. Table order.
    This is the most difficult to understand. You can use this to reorder a table without sorting it. For example, you have a table, High, medium and low. If you want to replace medium with medium-high and medium-low, you can do so by inserting the new tires at the right place, or by dragging to the correct place.

It’s just a ramble, Rambling Pete.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.