Copy a row from a table to a dataset

I have a dataset in a memory tag that is bound to a table on Perspective, I have a button that if I click it adds a row to my dataset which reflects on my table, is there a way to edit the table itself and reflect it to my dataset?

or to copy a row in a table into a dataset in a memory tag?

I’m pretty sure that you will need to write the changes to the table data back to the tag manually, either within the same on edit script you’re using to add the row(s), or via one of the table event handlers such as onEditCellCommit

Thanks for the response, actually I found out how to do it. I went to the event handler “onEditCellCommit” and wrote the following script:

valueToSet = event.value
#OP011 is the name of my memory tag with the dataset
#created custom properties for the table to bind tags, data, etc.
OP011 = self.custom.OP011
path = self.custom.OP011_path
self.props.data = system.dataset.setValue(self.props.data,event[‘row’],event[‘column’], valueToSet)
system.tag.write(path,system.dataset.setValue(self.custom.OP011,event[‘row’],event[‘column’],valueToSet))

I hope this helps for future references.