How to generate/modify rich client infopath form templates program

S

Sayan Ghosh

Hi,

I have a challenge where I have to supply dynamic infopath forms to my
users. These forms will be *.xsn templates which would be opened by users
using Infopath 2007 client in their local machines. I have the following
questions:

1. I have a ASP.NET website. In this site, the form will be available at
some page for download (not a hosted scenario). Based on some querystring
parameters, the page will do a DB query and generate/embed the initial values
to be shown in this form. To me, it looks like I have to create an xml file
and put the data there. Then, I have to create an Infopath document
programmatically (I don’t have any idea how to do that) and bind the xml file
with this form template and then present it to the user for download.
a. Question 1: Is it possible to create an Infopath document
programmatically from ASP.NET codebehind? Does anyone have a sample for the
same?
b. Question 1: Is it possible to bind the above dynamic .xsn template to a
custom xmlDocument object also created by C# code? Does anyone have a sample
for the same? Will this xml file be present as an embedded secondary
datasource or a primary data source in the final template? Is it possible to
secure that data so that user cannot extract/view the xml?
2. Next, if the above is possible, can we have the ability to refresh these
data values from within the form by calling a Web Service method (may be on a
button click)? Can this Web Service URL be made configurable?
3. When we send a form by email, is it possible to email only one view? Is
it possible to pick up the list of recipients from a field in the form?

Any suggestions/code samples will be invaluable.

Regards,
Sayan
 
C

Clay Fox

For me it would help to know the actual requirements for the solution.

What is the problem that is trying to be solved?
What are you starting with and what do you need to end with?

Then I could evaluate what the options would be.

You can email them to me if you want here.
http://www.infopathdev.com/members/clayfox.aspx
 
S

Sayan Ghosh

<<duplicating email content here for the benefit of other group members>>

Hi Clay,

I have some users who will have some assignments. When they come to a page
in my ASP.NET portal, based on their userID and current assignment ID, I wish
to make a xsn form template available for download. The template will be
designed using Infopath rich client designer and will use a Web Service data
connection. I will also author the web service accordingly. Now, my question
is, when the user opens the downloaded xsn template in his machine, he needs
to see data specific to hs assignment which will be fetched by web service.
But this means that I have to embed the "Assignment ID" into the xsn download
so that the form can use it as a query parameter to be passed to the web
service. I have no idea how would I embed a field into a xsn form template
while it is being downloaded from an ASP.NET website. So it is somehow
analogous to binding the form with some data source just before its
downloaded, but I don’t know how to do that programmatically. It would be
great if you could point me in the correct direction.

Add to that, I am an ASP.NET based web developer and Infopath is not my
strength...and I got 5 days! I love the challenge...but I do need the help of
gurus like u to make this work!
Thanks in anticipation,
Sayan
 

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