Skip to main content
Solved

Remove empty lines in External Files

  • 18 June 2024
  • 6 replies
  • 66 views

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
;;;;;;;
;;;;;;;
;;;;;;;

6 replies

Userlevel 4
Badge +8

Hello,

Did you try checking these fields?

 

Regards.

Userlevel 3
Badge +7

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.

Userlevel 7
Badge +19

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 

Userlevel 3
Badge +7

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

Userlevel 3
Badge +7

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.

Userlevel 4
Badge +9

@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