| SharePoint Integration / Customizing and Extending Web Parts | |
To customize a process name for InfoPath processes, do the following.
// Submit new form using InfoPath WebDAV Adapter
function CreateInfoPathFormByWebDAV(webdavAdapterName, fileName)
{
var obj = new ActiveXObject("AgilePointInfoPath.Integration");
var saveLocation = obj.GetDefaultSaveLocation();
var dav = XDocument.DataAdapters(webdavAdapterName);
dav.FolderURL = saveLocation;
if (dav.FileName.toLowerCase() == "form.xml")
{
dav.FileName = fileName;
}
dav.Submit();
XDocument.UI.Alert( "InfoPath form has been submitted successfully.\n\nDocument Name : " + fileName);
}
<Formula name>("_!_",<Field name 1,"-",<Field name 2,"_!_,now())
In this format, anything between the combination of the Underscore Exclamation Underscore delimiters (_!_) becomes the process name in the Web Parts. The now() function is concatenated outside the delimiters to ensure that the file names are unique.
Example:
<concat>("_!_",<EmpName,"-",<EmpDeptt>,"_!_,now())
In this example, EmpName-EmpDeptt becomes the process name in the Web Parts. The current date is added to the process name to ensure that the file name is unique.