From a button, how to add a row, then push button in newly added row?

Simple use case:
I have a table with a button column.
A button is used to add a row to the table.
How do I then push the button in the row all in one action?

ie.
List( AddRow(Table, Column, Value), RunActions(newRow.Button) )

Also thought to try:
RunActions( AddRow(Table, Column, Value).Button )

Thanks!

This will require a helper table to save the created row into. You cannot chain button clicking to AddRow, but you can pass AddRow result (created row) to save into a cell, then reference that row:

RunActions(
  [Helper table].ModifyRows(
    [Saved row], Table.AddRow(Column, Value)
  ),
  [Helper table].[Saved row].Button
)

P.S. If it’s not a canvas button but a button in a table, then instead of creating a helper table you can just create a column for the created row in the same table where the button that you click is.

2 Likes

source

Very helpful. Thank you!