Hello Daniel,
as far as I know there is no build in function to get the most recent entry, but I think you can do the following:
1. Use the Array aggregator module to put your search results into an array
2. Combine the sort() and the map() functions to get the document versions in descending order
{{sort(map(229.array; "version"); "desc")}}
3. Now you know, that the previous version always has the position 2 in your array and from there you can go on
To assign the version on position 1 (your previous version) to a variable you can use
Perhaps there is an easier way to solve your problem, but this is, what came into my mind at first.
{{get(232.testvar123; 2)}}
Regards
Lars