Prompt With List From File - Display All Lines Including Empty Lines From File

Hello,

I have a macro with just 1 action, Prompt with List from File. The text file contains empty lines. It seems that Prompt with List from File does not show empty lines. Is there an option that allows Prompt with List from File to display empty lines as well?

Test.txt file has empty lines.

Macro

Executing Macro
test1

Thanks,
Chris

Doesn't look to be. Try this...

Put the file's text into a Local variable, "Search and Replace... to Source" that variable to add a space to each empty line:

image

and use that variable as your "Prompt with List" action's "List from" (remember to turn off the "Sort Entries" option!).

1 Like

Hi @Nige_S, I tried your suggestion but it does not seem to work for me. Not sure if I'm doing something wrong here.

I was just wondering if there was an option to easily display empty lines. If not, I could always add dashes '-----' instead of using the empty lines.

Search and Replace Action (v10.2)

Search and Replace.kmactions (611 B)

You only posted the action, so I'm only guessing -- but did you read your file into the Local__text variable first? Did you turn off "Trim lines" (forgot to mention that earlier -- my bad) in the prompt's settings? You could also use the file directly as input to the action, saving the result to the variable.

Here's a proper demo, using the same text file and path as you had:

List with Gaps Test.kmmacros (3.4 KB)

Image

1 Like