Data files will sometimes have trailing a combination of trailing FF and empty lines. How do I remove both in the datamapper? They cause the repeat loop to go out of bound.
There is an option to ignore CR/LF at end of file, but it also doesn’t seem to remove the traling FF
The trailing FF and CRLF are not always present, but it is the trailing FF which causes the most issues when they are found at the bottom of text data files. They force an additional empty page and cause some steps to be out of bounds.
How can I dynamically remove them in the datamapper if they are present in the original text file?
I think you can write a Boundaries script to filter out those empty pages created by extra FF characters.
In the Input Data section, tick the Cut on FF option
In the Boundaries section, set the trigger to On script
Use the following script expression:
var oneChar = boundaries.get(region.createRegion(1,1,1,1));
if(oneChar[0]!="") boundaries.set();
The script looks at the first character that follows a FF. If there is none, then the following page is necessarily empty. And the script only sets a new document boundary if the page is not empty.
This script has the added bonus of filtering out any extra FF characters within the entire job file (well it doesn’t actually filter them out: it just doesn’t mark them as new document boundaries.
Not sure if that will work for you but with the tests I ran here, it worked like a charm.
I suggest you contact our Support team and provide them with an anonymized sample data file so they can figure out the best way to handle the issue.
You might also refer them to this post so they can see what has been tried already.