Hi Roessi
You did things not the right way and telling you where are the errors, would be longer than propose a piece of code.
{.set|#accgroups|{.get|accounts|groups.}.}
{.set|#ng|{.count substring|*|{.^#accgroups.}.}.} {.comment| works if groupname stars with * .}
{.for|ii|1|{.^#ng.}|
{:
{.set|tg2|{.substring||;|{.^tg.}.}.}{.set|tg|{.replace|{.^tg2.};||{.^tg.}.}.}
{.if|{.member of|{.^tg2.}|user=%user%.}|
{:
{.set|testval|{.get account|{.^tg2.}|notes key=test.}.}
{.if|{.=|{.^testval.}|allowedvalue.}| {: set or do something :}.}
:}
:}.}
I hope you can understand this code and complete or modify it for your needs.