# Automatic default selection

**URL:** <https://forum.getodk.org/t/automatic-default-selection/7056>\
**Category:** Support\
**Tags:** odk-xlsform, form-design, odk-collect\
**Created:** [June 28, 2017, 5:30am UTC](https://forum.getodk.org/t/automatic-default-selection/7056 "2017-06-28T05:30:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snvssh4a2017](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@Snvssh4a2017](https://forum.getodk.org/u/Snvssh4a2017)\
**Post date:** [June 28, 2017, 5:30am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/1 "2017-06-28T05:30:26Z")

</div>

Hallo guys, I hope you are all doing well, i have a question about the default item in ODK XLSForm,

Is it possible if i select and option for the first time it can remain the default answer for consequent number of times i will be using that form, Like the name or the location remain when doing follow up on a particular state?

Thanks in advance  
Nicholas

---

<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:** [June 28, 2017, 5:46am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/2 "2017-06-28T05:46:05Z")

</div>

Hi Nicholas, there isn't an easy way to store data across form-filling sessions.

If you are doing a baseline/follow up style campaign where you want to reduce data entry, you can preload data from the CSV and let users confirm/correct that data. [http://xlsform.org/#pre-loading-csv-data](http://xlsform.org/#pre-loading-csv-data) has a good write up on how to do that.

The ability to remember data across sessions (e.g., a historical auto-complete) is a cool idea, so I'm moving this topic to Features so we can see what the interest in the community is.

---

<div class="post-metadata">

**Author:** ![Snvssh4a2017](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@Snvssh4a2017](https://forum.getodk.org/u/Snvssh4a2017)\
**Post date:** [June 28, 2017, 5:44am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/3 "2017-06-28T05:44:43Z")

</div>

Am using XLSform to create the forms.

A good example of this is, when i take a survey of a place, and i want to do a follow up for the same to check on progress,, when i go back and select that particular place, i would like to have some fields/answers remain the same as selected in the first time of survey

Regards

---

<div class="post-metadata">

**Author:** ![Snvssh4a2017](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@Snvssh4a2017](https://forum.getodk.org/u/Snvssh4a2017)\
**Post date:** [June 28, 2017, 6:20am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/4 "2017-06-28T06:20:37Z")

</div>

Thanks a lot Anokwa,

---

<div class="post-metadata">

**Author:** ![Vanubhav](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/vanubhav/32/6981_2.png) [@Vanubhav](https://forum.getodk.org/u/Vanubhav)\
**Post date:** [June 28, 2017, 4:37pm UTC](https://forum.getodk.org/t/automatic-default-selection/7056/5 "2017-06-28T16:37:54Z")

</div>

@Snvssh4a2017

Hello,

We're currently doing something similar, but the time period is longer. When we need to auto-fill certain sections of the form, or look-up data from previous surveys, we attach the data as a media file and code the xlsxform to "pull" data from the labelled fields. Since we update this media folder data and our forms monthly, this works for us.

---

<div class="post-metadata">

**Author:** ![Snvssh4a2017](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@Snvssh4a2017](https://forum.getodk.org/u/Snvssh4a2017)\
**Post date:** [June 29, 2017, 4:17am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/6 "2017-06-29T04:17:03Z")

</div>

@Vanubhav

Thanks,  
Now can you please explain how to do that from an xlsform since this is exactly what am looking for, i need some fields to be filled with previous data, how do i save the previous submitted data in order to access it the next time i upload it as a media file

---

<div class="post-metadata">

**Author:** ![Vanubhav](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/vanubhav/32/6981_2.png) [@Vanubhav](https://forum.getodk.org/u/Vanubhav)\
**Post date:** [June 29, 2017, 3:42pm UTC](https://forum.getodk.org/t/automatic-default-selection/7056/7 "2017-06-29T15:42:42Z")

</div>

We're using a workaround to get the data in the format we require. At the end of the form, we have a small section populated with 'calculate' fields that stores the inputted data in the format we require. At the end pf the month, when we export the form as a .csv, we simply copy the data from the 'calculate' fields and add it to the next month's media file.

Note: We're using the 'calculate' function because we have multiple entry points for the same data, and so we need to concatenate this data into a single field. If you dont have this constraint, you could simply copy the data from your column to one in the media file.

Doing this, we are able to use Month 1's inputted data, such as names, addresses, phone numbers, unique ID's etc, and have them availble to search in Month 2's data collection form.

[XLSForm.org](http://XLSForm.org) has details on how to calculate and pull data from preloaded CSVs.

Hope this helps! If anyone has a simpler solution, please let us know!

---

<div class="post-metadata">

**Author:** ![Snvssh4a2017](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@Snvssh4a2017](https://forum.getodk.org/u/Snvssh4a2017)\
**Post date:** [July 6, 2017, 9:38am UTC](https://forum.getodk.org/t/automatic-default-selection/7056/8 "2017-07-06T09:38:05Z")

</div>

@Vanubhav

Thank you got it right.
