Skip to main content

Is it possible to remove empty lines in external files, in ‘External File Template Control’?

If there is an empty line in the import file - then there is no value to control in the control string - and I can’t find any information if there is a way to define a ‘null’ or ‘empty’ value to control against.

The first control with the value ‘Voucher date’ works perfectly - removing the header line.
I then have a list of voucher lines - and want to remove/disregard all lines that have an empty value in the first column.

 

The import file could look something like:

Voucher date;Account;Cost center;Amount;Project;Object;Tax code;Voucher text
2024-05-20;1910;;100;;;1;RAD1
2024-05-20;3740;;-100;;;2;RAD2-2
;;;;;;;
;;;;;;;
;;;;;;;

Hello,

Did you try checking these fields?

 

Regards.


Yes, I have tried these. And as far as I can test, these only affect the values or empty spaces within specific columns. It doesn’t allow me to disregard or remove the entire row.

Function removes empty spaces either in the beginning of the column - or all empty spaces anywhere within the column.

The string ‘One string with space’ would give the result ‘Onestringwithspace’ using the ‘Skip All’ parameter.


Hello @GISANCAR 

You can use satisfy option to achieve this.

In my case, I have in first column the company ID and I have made the setting in following way.

 

Then imported the voucher and it is processed without problem

 

Another option using Skip with column separator. I am using comma (,) as separator and I made setup as below. This also process the upload without problem. You can enter semicolon (;) in your case and this should work.

Hope this helps 


@Furkan Zengin, thank you for the suggestion. I think I can make something like this work.


Reporting back that the suggestion to remove line based on position and character ‘,’ or ‘;’ works perfectly.

Import is now running smoothly for all users using the function.


@Furkan Zengin - Thanks for this!  I’ve tried every which way in the past to skip these blanks rows, unsuccessfully.  It took me a few tries to notice that it is leaving the Column No blank that did the trick, but once I finally saw that it works great.


Reply