
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace line feed (ascii value 10)
I want to replace line feed with another character in an out block. I can't get the replace function to do it. Anyone know how to do this?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Didn't see it was about automations and had no idea how to do it.. but got curious 😉
So I built an automation accepting multi line input. In the output block "data to output" I used "Add formula -> Text Function -> Replace". Then for "old value" I used "Add formula -> Text Function -> Line break".
Running the automation with input:
text
with
multiple
lines
gives me the result "test;with;multiple ;lines".
Maybe that is more what you are looking for?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=replace('text1',chr(10),'text2')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes the replace function is what you are looking for. Here I'm replacing newline character with semi colon:
let vMyString = 'line1' & chr(10) & 'line2';
load
replace( '$(vMyString)', chr(10),chr(59)) as NewString
autogenerate 1;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe the line-break char-index isn't 10 else 13 or both in combination. Copy the data into an editor like Notepad++ to see which chars are really there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you can see, this is related to an automation and not a script. I'm fully aware how to do it in the script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Didn't see it was about automations and had no idea how to do it.. but got curious 😉
So I built an automation accepting multi line input. In the output block "data to output" I used "Add formula -> Text Function -> Replace". Then for "old value" I used "Add formula -> Text Function -> Line break".
Running the automation with input:
text
with
multiple
lines
gives me the result "test;with;multiple ;lines".
Maybe that is more what you are looking for?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's seems like the solution i was looking for. Couldn't find the linebreak function before you posted it here. I must have looked for another name
