List Iterator - custom delimiter, optional blank-skip

I’d like to see 2 options added to the list iterator action:

First it would be nice to be able to change the item seperator character (I assume that the default is CR/LF). A similiar request was made here:
https://www.finalbuilder.com/forums.aspx?forumid=7&postid=1543&view=topic
If you do add this option, please also add an option to ignore quoted seperators. So for example this string:
“Peter, Paul”, "Mary, John"
Would be seen as 2 items, not 4.


Second, I would like to see an option to ignore blank items. I aways have to put an “If ListItem <> Blank then …” action inside my list iterator actions, and it just seems like 1 extra step I shouldn’t have to do.

Hi Mike,

The List Iterator should already ignore blank items… do you have a reproducible case for this?

Sure:

New project, create variables ListVar and LoopVar
Add a DOS Action, set it to “DIR”, start in “C:”, log to "ListVar"
Add List Iterator Action, set the list value to %ListVar% and the variable to LoopVar
Under the iterator add an Action Group, set it’s name to “%LoopVar%” literally, with the quotes

Run the script, DIR will spit out a few blank lines in the header and footer. Look under the List Iterator items, and you will find Action Groups titled “” - proving that the blank lines made it through the iterator.

My guess is that you scrub for blanks lines BEFORE you de-reference the variable(s), but not after?

Hi Mike,

You were correct about the way skipping blank lines worked until now. The iterator was only skipping lines where the entre (unexpanded) property line evaluated to a blank line (ie a completely blank line, or a line referencing a variable which was completely empty.)

I fixed it so that the next test build will have a “Skip Blank Lines” option, on by default, which skips all blank lines.

Regards,

Angus