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.
- Open the document definition and create new service field;
- 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.
- Create new text field;
- 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.
- 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):
string path = Context.Field("Service Field").Text;
Context.Field("Name").Text = Path.GetFileName(path);
- Save changes.
- Go to the export settings of the document definition, select required export destination;
- Under Template settings click "Edit..." button and select Advanced view;
- 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);
- Apply new settings, save changes and publish new version of document definition.