Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2007

Tip: Looking for answers? Try searching our database.

Saving a form using a naming convention

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sabrina - 13 Nov 2007 16:01 GMT
I'm working on a form that I want the saved name to be created based on the
answers selected by the user.  For example:
Year.monthday.BusinessUnit.EventType.  I would also like the option to add an
(a),(b) etc., if there is duplication.  I would like the file name to appear
in the form as well as a pop up at the end for the user to document.  Please
help.
Clay Fox - 13 Nov 2007 20:26 GMT
I assume the components are all values in your form.
Best practice is to create a submit data connection that controls the saving
process.  You would use the concatenation function to create the filename and
would set a location for the documents to be saved.
You could create a field for holding this file name and have it calculated
and displayed in your form and also in a alert message or where ever.
Signature

Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com

> I'm working on a form that I want the saved name to be created based on the
> answers selected by the user.  For example:
> Year.monthday.BusinessUnit.EventType.  I would also like the option to add an
> (a),(b) etc., if there is duplication.  I would like the file name to appear
> in the form as well as a pop up at the end for the user to document.  Please
> help.
CK - 13 Nov 2007 22:07 GMT
Tell your submit button to perform a custom action using code.

Then in the code you have to do something like:

/// <summary>
/// Handles the Submit event of the FormEvents control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see
cref="Microsoft.Office.InfoPath.SubmitEventArgs"/> instance containing the
event data.</param>
public void FormEvents_Submit(object sender, SubmitEventArgs e)
{
WebServiceConnection submitConnection =
(WebServiceConnection)(DataConnections["Web Service Submit"]);
submitConnection.Execute();
string generatedName = GenerateName();
FileSubmitConnection submitSharepointConnection =
(FileSubmitConnection)(DataConnections["SharePoint Library Submit"]);
submitSharepointConnection.Filename.SetStringValue("YourTest" +
generatedName);
submitSharepointConnection.Execute();

e.CancelableArgs.Cancel = false;

}

Hope that helps.

> I'm working on a form that I want the saved name to be created based on
> the
[quoted text clipped - 6 lines]
> Please
> help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.