How output newlines?

Hi, I'm new to KM and making my first attempt to create a text expander macro that includes multi-line outputs. I'm stuck how to output newlines and other special characters. I tried to insert \n, \r, \R, %Return% and %LineFeed% in the output, but none seems to work. Below image shows what I tried to do. Any help is of course much appriciated!

I don't think you can do it that way. Instead, act on the value that's returned from the input, like this:

multiline test.kmmacros (4.4 KB)

-rob.

1 Like

Thank you, Rob!
I find it a pity that we need such a detour to get a newline in the output. But it works!

As your macros get more complicated, you'll find something like the demo construct much easier to use: Instead of trying to get the actual final result into the return portion of the Prompt with List box, just code a unique term for each input line, then act on the code in a Case or If/Then. This will make future debugging much simpler, as you won't have to try to read a long response hiding in the front part of the input string.

-rob.

1 Like