Page 1 of 1

Add line numbers - filter options

Posted: Sat Nov 28, 2015 12:44 am
by DFH
I am processing multiple input files.

I want to use the Add line numbers filter within a subfilter that restricts to certain matching lines.

There's a tick box option called "Don't reset at the end of file (useful in subfilters)".

btw. The option name is actually misleading when it refers to a file.

If I leave this ticked, the line numbers are never reset, so the line numbers for input file 2 continue after the last number for file 1, etc.
If I untick it, every added line number is reset. i.e. They all become "001" which is not useful at all.

I need something more versatile.

i.e. To reset ONLY at the start of a new input file, but not to reset within the subfilter.

Is this something you can fix?

Best regards,

David

Re: Add line numbers - filter options

Posted: Thu Apr 07, 2016 3:44 am
by DFH
Still awaiting a reply.

Re: Add line numbers - filter options

Posted: Wed Apr 13, 2016 10:31 pm
by DataMystic Support
Hi David,

I plan to get back to you on all these items by Friday.

Regards,

Simon

Re: Add line numbers - filter options

Posted: Mon Aug 08, 2016 1:03 am
by DataMystic Support
Now added ready for next release:

Reset at start of new file
When this field is checked, the line number gets reset when a new file is started.

Re: Add line numbers - filter options

Posted: Sat Dec 30, 2017 2:06 am
by DFH
Hi Simon,

I don't often use the Add line numbers filter, but when I do, I expect it to work properly.

When used under a Restrict filter, ticking the option to Reset at start of new file still does not work!

You claimed to have fixed this 16 months ago. Why am I still seeing it behave incorrectly?

NB. Ticking the option to Reset at end of restriction works fine.

Best regards,

David

PS. It also looks as though the UI tick boxes do not match what the filter is supposed to do?
Even so, it makes no difference to the output whether or not the box is ticked.
Screenshot 2017-12-29 16.10.34.png
Screenshot of filter UI
Screenshot 2017-12-29 16.10.34.png (117.26 KiB) Viewed 4520 times

Code: Select all

Perl pattern [<work.+>\n(.+\n)\s+</work>] with []
|  [X] Match case
|  [ ] Whole words only
|  [ ] Case sensitive replace
|  [ ] Prompt on replace
|  [ ] Skip prompt if identical
|  [ ] First only
|  [ ] Extract matches
|      Maximum text buffer size 4096
|  [ ] Maximum match (greedy)
|  [ ] Allow comments
|  [X] '.' matches newline
|  [X] UTF-8 Support
|
|   
|--Add line numbers
|     Start line 1
|     Increment 1
|     [ ] Don't increment on blank lines
|     [ ] Don't number blank lines
|     Format [%3.3d]\t
|     [X] Reset at end of restriction
|     [ ] Reset at start of new file
|   
|

Re: Add line numbers - filter options

Posted: Sun Jan 28, 2018 5:14 pm
by DataMystic Support
Hi David,

This has been rectified for 10.6.2.