User bio
404 bio not found
Member since Jul 25, 2017
Posts:
Replies:

Sometimes, like now, it's a good idea to give a variable an initial value...

set %out="", key="" for {...

One more comment, I'm not sure about the "quit" command after the closing curly brace,  I think you don't need it (because it's outside of the FOR loop, hence it will stop the flow of your application)!

I would say, a little bit to much "set" command.

Instead   of: Set tQStr = $$$ArrayToString(pQArray,tQStr,"##") 

try this  one: $$$ArrayToString(pQArray,tQStr,"##") 

Your version gives something like: Set tQStr = set %out="" for { ...

as you see, %out isn't a command (and set would be undefined, but that isn't the problem)

By the way, the second line of your macro should be:

set key=$order(%array(key)) quit:key="" ##continue

else you have the perfect endless loop

Certifications & Credly badges:
Julius has no Certifications & Credly badges yet.
Followers:
Following:
Julius has not followed anybody yet.