Set value of next iteration of select_one to last value


I have 2 questions inside a repeat

  1. weight of item - decimal type and is a required value
  2. unit of weight - select_one (kilogram or gram) and is a required value. The default is kilogram.

at the start of the 2nd iteration of the repeat, i want the unit of weight to be already selected and similar to the first iteration.

at the start of the 3rd iteration, the unit of weight is already selected and is similar to the 2nd iteration.