Reference last saved in another form

1. What is the problem? Be very detailed.
I would like to use two forms but in one of them pull an ID from an existing completed form on the device.
In the field the enumerator needs to collect two different sets of data, but they need to be linked with a common ID to make it easier to process the data.

The work flow is:
Complete form 1 (possibly part completion)
Complete form 2 multiple entries (unknown number of times)
Possibly go back to Form 1 to complete additional information.
Start another form 1... and so on.

I have a suitably complex form with repeating groups but I have been finding enumerators getting lost trying to jump between different 'levels' so this MIGHT be a way of simplifying the process (and downloading data). It also means enumerators can see their data points 'on the fly' (which they can't if it's part of a repeat group).

I was wondering if there might be a form-level equivalent of ${last-saved#}

This is not directly related to Auto-increment field in a given pattern - I'm not trying to ask two questions for the same problem, but I will be looking to draw in the 'Code' and 'Number' from the other form.

I don't envisage needing to find other (previously saved) forms - just the most recent - so no need to turn it into a select_one type.

2. What app or server are you using and on what device and operating system? Include version numbers.

ODK Collect and XLS Forms

Hi @seewhy
if you have two different forms it's not possible to make them work together like that. The ${last-saved#} option works only to fetch data from the last saved instance of the same form.