Submit Data Connection to local drive

D

Delnang

I have a need to create a Submit Data Connection to C:\. I see how to do
webservice or SharePoint but is there a way to send the xml form to C:\?

Thanks,
Angie
 
G

Gavin McKay

Hello,

One way to do this would be to create a data connection to call some custom
code (C# or VB) and save it directly to the C:\ drive. You can get access to
the full Xml document via code so you would be able to stream this to a file
fairly easily. You would need to have your form Fully Trusted to be able to
do this from memory, as you need elevated privileges to be able to access the
file system.

The other way of course is just use a "Save As..." from the File menu...

HTH

Gavin.
 
D

Delnang

I have a follow up question. What is the jscript code to set the default
filename to the content of a field in my form using File Save As?

Thanks,
Angie
 
G

Gavin McKay

Can't advise on JScript sorry - C# yes, JScript no :) However to get to the
content of a field on your form you would access the built-in InfoPath xml
document and use an XPath query to get the data. In design mode, on the Data
Source tab, if you right-click on the form value you want and click "Copy
XPath" you will have a full path to the item you need. Use that with your
XPath statement.

Gavin.
 

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