Lookup to set a variable

Lookup to set a variable

How can I use Lookup to set a variable?

I have two forms.

Form one has two two inputs, Name and type of participating (Dinner, after-party or btw)
Here I have registered all invited guest for a wedding.

The other form is for the guests.

Here the select the name from form one, using Lookup.
How can I copy the participating value from form one, for the selected name, to a hidden variable in form two?