Question Robert deLeeuw · May 9

BCreating Globals dynamically

Sorry for the weird question, but mumps skills are very rusty.

Am trying to create globals dynamically, but with using names from an array. For example: 

S Names="A,B,Y,Z"
S A=$L(Names,"$")
F I=1:1:A D
//Create globals based on names from database
//^A,  ^B,  ^Y, ^Z etc..  
Product version: HealthShare 2016.1

Comments

Robert Cemper · May 9
set Names="A,B,Y,Z"
set A=$L(Names,",")
for I=1:1:A set G="^"_$LI($LFS(Names),I) set @G="" write $zr,! 
0
Robert deLeeuw  May 9 to Robert Cemper

Awesome !  Thank you. (I forgot the @)

0