How do I send parameters to infopath

N

New to infopath

I made web part and i uploaded it to sharepoint portal this web part contains
hyperlink which opens infopath form.

The question is how to send parameters with the URL of the hyperlink to the
infopath form?
 
M

Michelle

A couple different methods for "passing parameters" to InfoPath were
described by Joel Alley at Microsoft
(http://www.mcse.ms/post2433530.html):

"Loading Data in the OnLoad event
The TwoField.xsn form has code in its OnLoad event to load data from
the GetData.asp page if no other data is in the form. To see this at
work, click Start->Run and enter the path to the form (ie.
http://myServer/IPDynamicData/TwoField.xsn ). If prompted, click
'Open. Notice that InfoPath launches and opens the TwoField.xsn form.
Field1 is filled with "test field 5" and Field2 is filled with "test
field 6", which are the values returned by GetData.asp when its
'dataRequest' parameter is set to "3".

Loading a Default Form with ExternalApplication.New
The default.asp page creates client-side script to automate the
ExternalApplication object to launch InfoPath and then create a new
form based on the XML data returned by GetData.asp. To see this at
work, click Start->Run and enter the path to the default.asp page (ie.
http://myServer/IPDynamicData/default.asp ). Note that the
'Initialize and script ActiveX controls not marked as safe" security
setting in Internet Explorer must be set to 'Prompt' or 'Enable' for
this to work. Notice that InfoPath launches and opens the
TwoField.xsn form. Field1 is filled with "test field 3" and Field2 is
filled with "test field 4", which are the values returned by
GetData.asp when its 'dataRequest' parameter is set to "2".

Loading an "existing" form from ASP
The GetData.asp page actually returns XML in the proper format for
InfoPath to open it as a form file. To see this at work, click
Start->Run and enter the path to the getData.asp page and pass a
'dataRequest' parameter (ie.
http://myServer/IPDynamicData/getData.asp?dataRequest=1 ). Notice
that InfoPath launches and opens the "GetData.asp" form. Field1 is
filled with "test field 1" and Field2 is filled with "test field 2",
which are the values returned by GetData.asp when its 'dataRequest'
parameter is set to "1". This demonstrates how you might have an ASP
page that searches for data stored in your SQL database and then
return that data to be redisplayed in InfoPath."

Hope this gives you some ideas.
Michelle
 
P

pumanug79

I'm trying to figure out how to either embed InfoPath in my c#.net
Windows Forms app (ideal situation) or launch it from the windows app
so it opens in a new window. Does anyone know if this is even
possible?

Thanks,
-Matt
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top