It is actually working in the new 3.14 with the new fast calc engine.
call in the field
pulldata("@javascript", "functions.js", "sameaslast", ${LPIDetail}, number(${RecCount}), "TopCanopy")
actaul function
function sameaslast(repeat, position, fieldname) {
if (position > 1){
return repeat[position - 2][fieldname];
}
}
Note take the comments out
Oh Also note you can use position({repeatname}) instead of reccount now!