<SourceFile> tag content doesn't match the source file name


In Document Definition → Export Settings for export file naming <SourceFile> tag is used. However, if the image was imported from Web Capture station,  name of exported file does not match with the source one.


To use the original file name as a part of output file name, modify document definition as described below:
  1. Open the document definition and create new service field;
  2. Navigate to field's properties →  Data Source tab and select Image Source from Source drop-down list.

    Note: if necessary, you can hide this field from the document form, so verification operators won't see it, and prevent it from being exported by disabling "Export field value" and "Show on verification" options on field's properties →  General tab.​

  3.  Create new text field;​
  4.  Navigate to field's properties →  General tab and set only Index field option as active.

    Note: you can also turn on "Show on verification" option just to check whether source file name will be displayed correctly.

  5.  Go to the Rules tab and create new rule of type script:
    • Add both service field and the text one;
    • Remove "Read Only" mark from the text field;
    • Enter the following code in the script editor window (it's C# code):
      using System.IO;

      string path = Context.Field("Service Field").Text;

      Context.Field("Name").Text = Path.GetFileName(path);
    • Save changes.
  6. Go to the export settings of the document definition, select required export destination;
  7. Under Template settings click "Edit..." button and select Advanced view;​
  8. Scroll down tags list, from Index fields select the one that has been created on the step 3 (text field with a rule on it);
  9.  Apply new settings, save changes and publish new version of document definition.

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Recently viewed