Dynamic values for min/max table stepper buttons

Is there any way to limit the maximum value of a cell inside a table (by matching it to the next cell's value/or any other way)?

The idea is not to exceed the request of an available quantity. The max value of all rows would be different according to what's available.

image

you will need to have a variable or transformer to store the qty of each row, get the sum and subtract it to the available qty

e.g.
Sum of rows

{{ table1.data.reduce((accumulator, currentObject) => {
  if (currentObject.hasOwnProperty('qty')) {
    return accumulator + currentObject.qty;
  }
  return accumulator;
}, 0)
}}

the major issue with this approach is that you will need to save every change made to the qty row before editing another row because the variable/transformer will not keep track of edited cells without saving

If you want it to update in real-time while editing, you need to merge the .changesetArray()

Thank you for your answer. I'm trying to match the max value of a cell in a row to another's in the same row.

In example:

image

Buy max limit = available.

Ended up doing it like this and it worked fine.
It would be nice if the documentation said that you can use i as an index inside that property.

Screenshot 2023-12-05 145607