# Using last-saved in Build

**URL:** <https://forum.getodk.org/t/using-last-saved-in-build/38442>\
**Category:** Support\
**Tags:** odk-build\
**Created:** [June 1, 2022, 4:11am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442 "2022-06-01T04:11:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [June 1, 2022, 4:11am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442/1 "2022-06-01T04:11:06Z")

</div>

hello all right.. I saw that you have a lot of knowledge with the lest save option... I really need to implement this in my form, but I'm not an expert in XLSForm, so I build my forms in ODKBuil(online) and then download it normal in XML and I make manual changes in notepad, but trying to insert it in the Default Value field in ODKBuild in a question, this device does not work, I have already made several changes to this syntax, including following the example of [https://docs.getodk.org](https://docs.getodk.org) but I it seems that the examples in there are all to be executed in XLSForm and not in the nocode tool that you have online.. would you know any solution for me..

---

<div class="post-metadata">

**Author:** ![mathieubossaert](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/mathieubossaert/32/6131_2.png) [@mathieubossaert](https://forum.getodk.org/u/mathieubossaert)\
**Post date:** [June 1, 2022, 5:03am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442/2 "2022-06-01T05:03:30Z")

</div>

Hi @BrunoAngelo ,

I saw your posts about last\_saved. I am sorry I never used odk build. I will not be able to help you on that.  
Anyway here is the xml line for my "user\_name" text question, in the "utilisateur" group, using last-saved

```xml
value event="odk-instance-first-load" ref="/data/utilisateur/user_name" value="coalesce( instance('__last-saved')/data/utilisateur/user_name , /data/utilisateur/username )"/>

```

---

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [July 27, 2022, 1:55am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442/3 "2022-07-27T01:55:53Z")

</div>

thank you this was very useful.. but as it took a while to respond i had already managed it... and really by the odkbuild tool it is not possible just writing the line of code as you gave the example

---

<div class="post-metadata">

**Author:** ![Florian\_May](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/florian_may/32/7758_2.png) [@Florian\_May](https://forum.getodk.org/u/Florian_May)\
**Post date:** [July 27, 2022, 11:48am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442/4 "2022-07-27T11:48:34Z")

</div>

I'll take a note to see whether there's an option in Build. Couldn't tell off the top of my head just now, sorry.

---

<div class="post-metadata">

**Author:** ![Florian\_May](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/florian_may/32/7758_2.png) [@Florian\_May](https://forum.getodk.org/u/Florian_May)\
**Post date:** [July 29, 2022, 6:09am UTC](https://forum.getodk.org/t/using-last-saved-in-build/38442/5 "2022-07-29T06:09:01Z")

</div>

@BrunoAngelo Sorry it looks like `last_saved` is indeed not in the [XForms spec](https://getodk.github.io/xforms-spec/), so support in ODK Build will only be possible once it has been introduced into the spec.

The most comfortable way to use `last_saved` will be to construct the form in Build, export to XLSForm, then add the `last_saved` where needed. For reference: [how to use `last_saved`](https://docs.getodk.org/form-logic/#values-from-the-last-saved-record).
