Customizing a Process Name

To customize a process name for InfoPath processes, do the following.

Instructions

  1. Modify the code in the script.js file to customize the process name for InfoPath Client processes.
    1. Open the file [AgilePoint Envision installation folder]\InfoPath\script.js.
    2. Replace the code dav.FileName = fileName; code with the following code:
      // 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);
      }
  2. In the InfoPath form, modify the data connection for Submit:
    1. In InfoPath, open an InfoPath form you want.
    2. Open Data Connection Wizard. You can access the Data Connection Wizard via: File > Info > Submit Options > SharePoint Library > Manage.
    3. On the Data Connection Wizard, click Modify.
    4. In the Form Name field, click the Function button, and then insert a formula in the following format:

      <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.