Remove row in DAT table after amount of time

Hi there,
I’d like to delete of a row in a DAT table after a specific amount of time (lets say, 5 seconds).

Does anyone have an idea how to do that?
(and im n00b to feel free to be very specific :):):):slight_smile: for eg book up the table to eval with another table and type this into table is not too specific :slight_smile: Thanks so much in advance!

it all goes down to one line of python op('table1').deleteRow(1)
where table1 is the name of your table, and (1) is the row you want to delete

see example
delete row every 10 seconds.toe (4.7 KB)

I have put two buttons in the network, one deletes row 1, the other button appends a row at the end of the table. Have a look at the code inside the panel execute DATs and change it up to familiarise with it.

You’ll see a timer in there too, if you un-bypass it by clicking on that small arrow pointing right on the timer node itself, you will see that row 1 will be deleted every 10 seconds.
Adjust the timer length to the time you need.
The same line if python code is written in the timer callbacks under the timer.
If the timer for any reason doesn’t start automatically just click on ‘Start’

I hope this helps!

This is the documentation about the DAT class. It’s intimidating at first, but it all starts to make sense after a while.

1 Like

This is perfect thank you so much!

1 Like