Auto update table cell

Say in my table I have 3 colum A(number), B(number), C (number result of A*B) .

now i want to give user option to change value of A and B from the table (editable cell) . I want if they update A / B then C should be automatically update in the ui .

C is disabled in the table , I can not make it updated based on the user's changed value.

I can get the value with custom js and calculate (triger on change and match with selected row) but just can't find any way to update C cell.

Any suggestion is welcomed.
Thanks

Hello @mpmohi,

We can achieve the behavior you want (auto-updating column C = A * B when user edits A or B) using a custom column with a calculated value.

  1. Use a custom column for C
  • Open your table component settings.
  • Click “+ Add column” > Custom Column
  • Set the column’s value using JavaScript:
{{ currentSourceRow.column_A * currentSourceRow.column_B }}
  1. Screenshots

2 Likes

Agreed! If you need it to change before saving the changes, you'd have to add a reference to the table's changeset in your custom logic. You can have ternary logic that checks if there are any values in the table's changeset array, and if so, use those values instead of currentSourceRow