Sorry, I don't wrote it clearly. I don't want change the data source during
run time. I want change the data source during design time and find out the
chosen data source name during run time.
I have about 370 data sources assigned to 370 Drop-Down List Boxes. The user
selection is written down to a Sharepoint Server and a SQL Server via
Project Server 2003 on submit. To write to Sharepoint is for free. To write
to SQL Server I programmed SOAP messages using Projects PDS calls. Building
the SOAP message requires the Data Source name (acts as a FieldID) of the
Drop-Down List Boxes. I hard coded this information for my first 3 Drop-Down
List Boxes. I don't want to do this for the remaining 367 (also imagine the
maintenance effort on changes)! So I'm looking for generic code, which reads
out the Data Source name, builds the SOAP message and send it to Project
Server. Everything works fine except the possibility to read out the Data
Source name of a Drop-Down List Box.
Many Regards and thank you for your help
Chris
"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> schrieb im
Newsbeitrag That's great in concept. But the reality of how InfoPath works is that it is
a very bad idea to change the name of your secondary data source once you
have the form built out. It can be done (i.e. global search and replace with
a lot of care and attention), but it's just bad practice. You are better off
using a generic name, and changing out only the data inside the data source
instead of renaming the data source.
--
Greg Collins [InfoPath MVP]
Please visit:
http://www.InfoPathDev.com
Yes, the internal InfoPath name used to reference the data source. I know I
could hard code it.
But I would like to change the data source without changing my source code.
Additionally I have
many many Drop-Down List Box and it would be more foolproof to have this
information once only.
Regards
Chris
"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> schrieb im
Newsbeitrag What about the data source do you need to know?
The internal InfoPath name used to reference the data source (i.e. the one
you named it when you added it to the form template)? If so, this is a fixed
name, and you should be able to hard code it.
The absolute path of the .xml file used as a secondary data source? I don't
think you have access to this information.
What else?
--
Greg Collins [InfoPath MVP]
Please visit:
http://www.InfoPathDev.com
Hi
I use a Drop-Down List Box which gets its data from a data source (xml).
During the submit processing it is important to know that data source!
How can I read it out? (XDocument.DOM ....???)
Thanks in advanced
Chris