Use a Date Value in a File Name
Issue
I would like to use a Date value from an Index Field as part of a file name when exporting. However, the date format is, "MM/DD/YYYY", and the slash, (" / "), character is not allowed in file names. My company does not want to change the format in the Regional Settings to use a different character other than the slash.
How can I use the Date value as a filename.
Solution
You can implement a Validation script to implement a second, hidden Index Field as a VARCHAR then copy the DATE value into that Field and format the value, replacing the slashes with something else. You can do this in the DocumentPostProcessing event. Here is an example where Name0 is the DATE Field and Name1 is the VARCHAR Field:
Private Sub test1_DocumentPostProcessing(sender As Object, e As PostDocumentEventArgs) Handles Me.DocumentPostProcessing
Name1.IndexField.Value = Name0.IndexField.Value.ToString.Replace("/", "-")
End Sub
In your Export Connector setup, you would use the hidden Index Field for the file name.
Level of Complexity
Moderate
Applies to
Product | Version | Build | Environment | Hardware |
---|---|---|---|---|
Kofax Capture | ALL | ALL | Windows |
References
Add any references to other internal or external articles
Article # 3042651