Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Jon Tofte-Hansen
2017-01-13T15:26:46Z
Hi
I use a "for each loop" on a write task to iterate a variable with lines ending with CrLf and write the lines to a file. In the process I want to remove the Cr, so lines are terminated only with Lf.

1: In the loop I set the [Line break] = Cr
2: In the write task I set [Line break] = NoLineBreak
3: Result: only Lf in the file (!)

This is what I want, but I don't understand why [Line break] in the loop should not be = Lf. If I choose Lf the result is only Cr in the file. Is it a bug?
Sponsor
Forum information
Support
2017-01-16T08:46:39Z
I do not not think so, have you checked your file with notepad++ or similar? You can attach the file here with screenshots of settings.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Jon Tofte-Hansen
2017-01-16T12:08:31Z
I have tested again and the behavior is as I described. But after giving it some thought it may be correct behaviour after all.

When [Line break] is set to "Cr" in the [For each x in y] the following "Lf" is added as the first value in the next iteration.

Ex (having [Line break] = "Cr"):
testline1[Cr][Lf]
testline2

1st iteration: "testline1" is processed.
2nd iteration: "[Lf]testline2" is processed.

The result:
testline1[Lf]
testline2
Support
2017-01-20T09:38:37Z
Yes, as you split on Cr the Lf will remain in the string. This means you have to Replace any Lf on the current row before using that row.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top