@gab Welcome to the forum!
Can you post an example of that array? And are you attempting to populate the a column with a value from an array in another column?
Can you post one complete row of the table from the output as I am having trouble formatting the table based on the data you sent... forget currentRow for now, I just need one complete row to build a table like yours
OK so let's say that for each row you want to populate another column with the last value of the reports array, as an example, where name is sue Shei you want a column that will have Status of confirmed...? Is that correct?
Without answering that question yet, so far I am going to assume you need all values... so you can add Custom Column for status, reviewer, and date and in each within the Value field:
In the Code panel, create a new JS Transformer, e.g. getReportStatus
It should contain something like…
var selectedRow = {{reportsTable.selectedRow.data}};
return selectedRow.reports.pop().status;
In the table, set the Value to {{getReportStatus.value}}
Celebrate!
However, I highly recommend a quick read of the Transformers docs, it's concise and more helpful Transformers
And if someone at Retool knows or implements a way to get the last element of an array inside a {{ }} code block, I hope they post it here and update the array docs.