Check if line in global variable is empty

In a global variable list I would like to check if a certain line is empty or not. If it's not empty, it runs the next action, if it's empty it cancels the macro

Check if variable list line is empty.kmmacros (3.1 KB)

Keyboard Maestro Export

So for example if I type something for Local__VarName1, Local__VarName2, Local__VarName3 and then at the end of the macro I have an action (or set of actions) to check if line #4 is empty, since this will return TRUE (it's empty) it will cancel the macro. If instead I was to check if line #3 was empty, since this is FALSE, it would keep running the macro.

EDIT: I was able to make it work using %Variable%<VariableName>[<IndexNumber>]% like this:

image

I'm getting there...
So if I use it like this inside the action to set to the global variable, it works:
%Variable%Local__VarName1%,%Variable%Local__VarName2%,%Variable%Local__VarName3%,%Variable%Local__VarName4%,%Variable%Local__VarName5%

Now, this is just for visual purposes: can I either
1 - Keep the comma, but have each variable in a separate line? Right now if I hit Enter after the comma, it doesn't work
2 - Instead of using comma, can I still check per line, similar to using %Variable%textAllVars[3]% but now the [3] is related to line, not array index (I think that's what it's called, right?). Or something similar to [3], of course.

Right now I can make the macro work, but I'm just trying to learn something new.

I tried a different approach, but my other questions are still valid, so I can learn something new from this. Here's my new approach with less actions and less things to look at

Check if variable list line is empty v2.kmmacros (3.4 KB)

Keyboard Maestro Export