Ah, thank you very much, Richard H.

Just tried the "Execute()" -command. That is what I was searching for.
This made both @userid and the group-array work in the loop.
I will try the other two suggestions later.

Regards,
Carsten