I assume this is simple but I missing something
So let’s say I have universal patient4 I can run the code
delete universal patient4
and all is good and universal variable is deleted
My scenario is I want to delete a given number of universal variables in a repeat loop. Such as
repeat 3 times
delete "universal patient"&repeatindex()
end repeat
This doesn’t work as I get invalid use of the delete command.
Similarly, I was playing around and running this
repeat 2 times
set var1 to "universal patient"&repeatindex()
log var1
log the value of var1
set the value of var1 to empty
log the value of var1
end repeat
universal patient1 exists and this code does not error out but it does not set the value to empty
Instead, I see
Thanks for any help
Edit or update. Also tried this. Logs out what I expect but nodda on the delete
Repeat numOfPatients times
insert "universal Patient"&RepeatIndex() into deleteList
insert "universal Patient"&RepeatIndex()&"DataFile" into deleteList
End repeat
Repeat each item of deleteList
log it
delete it
End repeat