Set submitted ID record as default in a lookup field

Set submitted ID record as default in a lookup field

Dear All,

I have two forms Test1, Test2. In the submit button of the Test1 form I have an openurl which redirects to the Test2 form.
Now, Test2 form has a lookup field with the IDs of the Test1 form.
My question is:
When I  click the submit button of Test1 I would like the submitted ID of the form to be the default value in the lookup field (in Test2 form).
In general I want when I click the submit button then the ID of the submitted form to be the default value in the lookup field (which keeps the IDs of Test1). Do you have an example of that?