How to reference the last cell in a table for a moviefilein location

Hi, I have a table which has file locations appended. I want to use the most recent addition to the table as a reference in the movie file in TOP file parameter. Is this possible? Or do I need to do something like use DAT Execute to look for changes, then use that to fill a text DAT with the last addition and use that as a reference?

Thanks

Solved by using a DAT select on the table with me.inputTable.numRows -1 as start and end row, then using op(‘DATselect’).text in the movieFileIn TOP

Hi @retone,

that’s a valid solution, otherwise getting to the last row in a table can be done by list comprehension since .row or .col on a Table DAT will return a list of cells:

# using the column name
op('myFiles').col('nameOfColumn')[-1]
# alternatively you can also specify the column number
op('myFiles').col(0)[-1]

My personal favorite is to use a Sort DAT, reverse the order and always just pick up the first row of the table:

op('myFiles')[1,'myColumn']

More information on how to access and edit table content can be found here:

cheers
Markus

Thanks! I was wondering about reversing the table order but hadn’t got round to working that out so thanks for the tip :slight_smile: