The source file name returns {Empty Value}.



The source file name returns {Empty Value} instead of the actual file name when importing files via the connector.



Try the following workaround:

  1. Create a Service Field in the Document Definition and name it for example "ImageSource":
  2. Open the field's properties and in the tab Data Source select Source: Image Source
  3. Open Export profile settings in the Document Definition.
  4. Set Filename template as <RegParam:ImageSource>:
  5. Save and publish Document Definition.
  6. Open Workflow settings for the Project or BatchType (depending on what is used).
  7. Set it as an Advanced workflow scheme and right before Export Stage create the Automatic stage (Create Processing Stage > Automatic > OK).
  8. Open stage properties and then the Script tab.
  9. Select Type: Document Processing and click Edit Script…
  10. In the script editor select C# .Net language and put the following script:
using System.IO;
string s = Document.Field("Invoice Layout\\ImageSource").Value.ToString();
s = Path.GetFileNameWithoutExtension(s);
Document.Properties.Set("ImageSource", s);

11. It is required to change the full path of the service field you created in the Document Definition in the script at the following line:

string s = Document.Field("Invoice Layout\\ImageSource").Value.ToString();

12. Save settings and try to perform export again. 

The script will take value from the Service field ImageSource and then will set the registration parameter for the document with the value of the field. At the Export stage, the value of the registration parameter will be used to name exported file. 

Have more questions? Submit a request



Please sign in to leave a comment.