Publishing and saving

  • Thread starter Dave a non-programmer
  • Start date
D

Dave a non-programmer

I am having a heck of a time trying to publish my form to SharePoint.

I would also like to find out if a rule could be set-up to actually "Save
As" after every entry. The "Save As" would have to be directed to the correct
folder and would use the date as the file name
 
S

Shiva (GGK Tech)

Hello,

After completing all your changes you can Save As the file and name as
‘template.xsn’ in your local computer. Copy this ‘template.xsn’ to sharepoint
library as below path,

http:\\<ServerName>\<SiteName>\<LibraryName>\Forms\
 
D

Dave a non-programmer

Shiva,
I got that part.
What I want to do is when the people are using thisw form I want the form to
update on the fly and also SAVE AS the date back onto sharepoint
automatically after each time the SSUBMIT button is pushed or each time a
field changes.
 
S

Swathi

Hi,
You can do this in oncontextchange event. In that event, write the code to
submit the form to the library.
 
D

Dave a non-programmer

Swathi,
As my name implies, I am not a programmer.
Could you walk me thru the steps?
 
S

Santhosh (GGK Tech)

Hi,

Define a function to submit the form to SharePoint and call that function in
OnContextChange event and button OnClick event.

Define a function:

public void SubmitToSharePoint(string submitAdapterName, string
sharePointFolderPath, string fileName)
{

DAVAdapter sharePoint =
(DAVAdapter)thisXDocument.DataAdapters[submitAdapterName];
sharePoint.FileName = fileName;
sharePoint.FolderURL = sharePointFolderPath;
sharePoint.Submit();

}


In the above code 'submitAdapterName' is SharePoint data connection name,
'sharePointFolderPath' is path to SharePoint form library, 'fileName' is name
to the file you are submitting.
Dont forget to add ".xml" to the file name while calling the function.
e.g:
SubmitToSharePoint("Submit Connection",
"http://<server>/<Site>/<FormLibrary>", DateTime.Now.ToString() + ".xml")
 

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