Hi,
I was able to pull list of users from the group call "AA ADMIN" by using a contact "AA_ADMIN".
Now, is there a way I can pull the email addresses of these users.
Any advises please.
a!localVariables( local!listOfUsers: getdistinctusers(togroup(cons!AA_ADMIN)), local!listOfUsers )
Discussion posts and replies are publicly visible
I'd prefer the newer OOB function, a!groupMembers()...
a!localVariables( local!userList: a!groupMembers( group: cons!AA_ADMIN, memberType: "USER" ), a!forEach( local!userList, user(fv!item, "email") ) )
Mike,
I would like to concatenate of email address of two different variables. When I try to perform union of two local variables, I am encountering an issue.
First local variable "local!membersEmail" of type "List of Variant" and second variable "adminUsersEmail" is of type List of Text String.
Is it advisable to convert first variable to tostring()
a!localVariables( local!membersEmail: index( rule!AA_getMembers( key: {1,2,10}, ), "email" ), local!adminUsers: a!groupMembers(group: cons!AA_ADMIN, memberType: "USER"), local!adminUsersEmail: a!forEach( local!adminUsers, user(fv!item, "email") ), local!emailList: toemailaddress( union( local!membersEmail, local!adminUsersEmail, ) ), local!emailList )
HI swapnar6405, Can you try below updated code?
a!localVariables( local!membersEmail: toemailaddress(index( rule!AA_getMembers( key: {1,2,10}, ), "email" )), local!adminUsers: a!groupMembers(group: cons!AA_ADMIN, memberType: "USER"), local!adminUsersEmail:toemailaddress(a!forEach( local!adminUsers, user(fv!item, "email") )), local!emailList: union( local!membersEmail, local!adminUsersEmail, ), local!emailList )