# Set value of next iteration of select\_one to last value

**URL:** <https://forum.getodk.org/t/set-value-of-next-iteration-of-select-one-to-last-value/38905>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [September 7, 2022, 10:18pm UTC](https://forum.getodk.org/t/set-value-of-next-iteration-of-select-one-to-last-value/38905 "2022-09-07T22:18:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaffyM](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/raffym/32/11528_2.png) [@RaffyM](https://forum.getodk.org/u/RaffyM)\
**Post date:** [September 7, 2022, 10:18pm UTC](https://forum.getodk.org/t/set-value-of-next-iteration-of-select-one-to-last-value/38905/1 "2022-09-07T22:18:14Z")

</div>

Hi.

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.

Thanks

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [September 7, 2022, 10:45pm UTC](https://forum.getodk.org/t/set-value-of-next-iteration-of-select-one-to-last-value/38905/2 "2022-09-07T22:45:53Z")

</div>

See [https://docs.getodk.org/form-logic/#dynamic-defaults-in-repeats](https://docs.getodk.org/form-logic/#dynamic-defaults-in-repeats)
