Last-saved function error in v2025.2.0 Collect

Good afternoon,

1. What is the issue? Please be detailed.
I have an XLSform with a default value generated by the last-saved function (${last-saved#table_list_observer}) so I don't have to select the observer name for each entry.

Up to (at least) ODK Collect v2025.1.5, my form worked fine. If the form had never been opened and filled out, then no observer was checked in the observer list, and if the form had already been opened and filled out once, then the last observer entered was already checked in the list.

Since ODK Collect v2025.2.0, the last-saved function generates an error message: XPath evaluation: Mismatch value of type 1110 could not be loaded into question null. Check if the value 1110 is a valid option for the null question.

During my tests, the problematic version of ODK v2025.2.0 was installed on Android 15, but I didn't have these issues with the previous version of ODK.
And my form works fine on ODK version v2025.1.5 installed on Android 8.0.0.
I use Central v2025.2.0.

I am attaching a screenshot of my xlsform form with the lines containing the last-saved values.

4. Upload any forms or screenshots you can share publicly below.

Hi @maccamons

When you get a chance, please introduce yourself here. I'd also encourage you to add a real picture as your avatar because it helps build community!

There is something wrong, in fact, if last-saved is used with external choices. I'm currently trying to track it down so that we can release a fix ASAP.
Thanks a lot for reporting the issue!

1 Like

Hi @Grzesiek2010,

Thanks for your feedback. I can confirm that the value 1110 is indeed among the available choices in my external CSV. I'm using an external CSV that I haven't modified in a while.

Accessing this value in the same external CSV has worked fine since ODK v2025.1.5, but not since ODK v2025.2.0.

So the problem lies elsewhere, but I don't know where...

Hi @maccamons. The problems with last-saved here seem to be limited to it being used with search. We're looking into a fix, but you should be able to get your form working by replacing the usage of search for select_one_from_file.

So for example, the type column for the question table_list_observateur would become select_one_from_file observateurs.csv and you'd remove search from the appearance.

1 Like

Hi @seadowg,
I just made the changes you suggested, and it works fine on both versions of ODK.
My problem is now resolved, and I wish you luck in fixing the bug I reported.
Thanks again.
Best regards,

@maccamons Just a quick question: how large is the dataset ("observateurs") being used here in terms of the number of items? I just ask because search can provide optimizations for larger datasets, so it still might be worth switching back once we've fixed the problem.

The data file ("observers") consists of about twenty elements. So it's quite light.

1 Like

Great! There's no advantage using search then.

3 posts were split to a new topic: Public access links with last-saved not working as expected in Central v2025.2