Select Page

You can try a Query String as parameters pass to InfoPath form and if you wish to have a solution without code, you can use Query String (URL) Filter Web Part solution.

you can check the relevant more detail in this link it will show how to achieve same in an alternate way.

Passing Data From One Infopath To Another Infopath Form

Click to Know

If you want to achieve them with a code, you can use like:

// URL: https://www.foo.com/bar.xsn?xyz=1

public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
   // Assign the value of the parameter 'xyz' to the string 'xyzValue'
   string xyzValue = e.InputParameters["xyz"];
}