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.

How to Pass Query String data into an InfoPath Form

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

// URL:

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