How to recognize last record into a field calculation

In a calculated field I would like to add a string to another one in the last record of the foundset, like:

outputstring = 'blablabla';
if (  controller.getMaxRecordIndex() == controller.recordIndex  )
{
var outputstring = outputstring + 'thelastblabla';

}
return outputstring;

But the field remains empty in all cases.
In FM I can use the Status Functions in calculations, what is the Servoy equivalent?

I don’t think that will work since controller is not an object in the (calculation) editor tree. This means it’s not available/supported inside a calculation.

Maybe Servoy dev team can pass some parameters to calculations (like they do with the rowBGcolor calculation).
Parameters like recordIndex, selected and MaxRecordIndex.