Use a value from the last entry of a repeat

I'm collecting forest measurements with ODK Collect and the work is organised having a field sheet (i.e. ODK form) for each sampling plot with a repeat for each included tree. The woodlands are quite homogeneous so the field "species" most likely contains similar values within a plot. Obviously, digitising/selecting the same name for many entries slows things down.

Initially I tried solving the issue using ${last-saved#species} but this approach seems to work only between field sheets and not within them (i.e. among collected trees of a repeat). Then I saw the availability of dynamic defaults but it still does not work. Any idea?

Below the screenshot of the abovementioned section:

I'm using the last version of ODK

Within a repeat repeat_name, I have used a default value for integer and select_one fields of name variable_name as:

default: ${repeat_name}[position() = position(current()/..) - 1]/variable_name

Your screenshot is cutoff but appears to be similar? I don't have minimal autocomplete appearance though, only columns-pack

ooops...I confirm: the content of default is cut, but it resembles exactly what you wrote (and what is reported in the link above). I really can't understand why it does not work in my case

I experience the same also. The following doesn't work for me.

default: ${repeat_name}[position() = position(current()/..) - 1]/variable_name

begin_repeat
begin_group
select_one variable_name
end_group
end_repeat