Complete Automation of InfoPath

G

Gaurav Bhardwaj

Hi,

Can we program an InfoPath application which can connect to any database
table? By this what I mean to ask is that can we have a form with some input
fields in which we can input the data source, table and valid credentials
etc. When we press a button it connects to the table, checks the fields,
datatypes etc and then redesign itself accordingly. For e.g if I input the
database name as northwind and table as Region then it will generate a form
with two text fields for Region ID and Region Description.

If InfoPath does not provide this facility then can we write an application
in some other language(like C#) which can connect to any database and
generate InfoPath form accordingly.

Thanks,
Gaurav
 
F

Franck Dauché

Hi,

Unfortunatly, InfoPath doesn't support this. Your controls needs to be
added at design time. There is no way to add or modify controls at runtime
through code.

Franck Dauché
 
P

Patrick Halstead [InfoPath MVP]

Hi Franck - good to see you posting here recently! :) I need to post more!
We have created forms that dynamically change the controls based on the
data. The trick is to have sections that contain each of the possible
controls and switch between them. Another technique is to generate the xsf
programmatically, but that is much more difficult. So, yes, it is possible
and you can condition it on data when you load the form.
 
F

Franck Dauché

Thanks Patrick. Good to hear from you.
I just didn't want to go there...
I tried generated the xsf programmatically myself, and yes, it not trivial.
So, I gave the short answer...for 99.99% of the people using IP out there I
am afraid the answer is still no.

Franck Dauché
 

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