How to post values into new form?

J

JWL

I want to post some of my values in a form to a new form. All from code.

So, how do I send a number of strings to a new form from code (C#, VB.NET)?
 
D

darko

Hi JWL,

There is no-way of posting a data into a new InfoPath Form. But the
work-arround you could implement is to store that data somewehe (XML shared
file, Database etc.) and on the OnLoad Method in InfoPath, retrive that data
and fill in the InfoPath. But there is another issue called concurency, what
if two or more users want to open a form with post data, you will have to
find a way to hadle the post-data per user. I think you understand me,
becouse while the form is openning, another user can overwrite the temp-data
from the firs user....


Darko Milevski, MCAD
 
J

JWL

Hi,

Thanks for your reply.

Looks to me like this is very basic functionallity and need in/for
forms.Strange that it is not possible to post values to an Infopath form?

Okey. Different solution:
What if I have a list in a Sharepoint 2007 portal containing the info I want
to fetch. How do I adress a specific row in the list from InfoPath? Can't
find a filter function or similar for that.

Want to help me out? =)
 
D

darko

Yes, its possible in two ways, you can load all list items in the InfoPath
(secondary data source) and filter that source in the InfoPath, or you can
write a Web Service that will read the specific row, of course you can than
post the search criteria as parameter to the Web Service, and he will return
the row you want. Maybe the Web Service is more scalable solution, but you
must write it, host it on the SharePoint (make him unmanaged for SharePoint)
and so on. The filter for selecting a specific row in SharePoint is so-called
SPQuery object.

You can get a ListIteCollection with thid function in SharePoint:
http://msdn2.microsoft.com/en-us/library/ms457534.aspx, by passing this
SPQuery object as parameter
http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spquery.aspx

Darko Milevski, MCAD



Darko Milevski, MCAD
 

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