How to list all the members of a group and store them to a local variable to show them in a grid also select multiple members to delete and add the members, using groupmember function?
Discussion posts and replies are publicly visible
Use groupMembers() to retrieve members. Display members in a grid.Add checkboxes for selection. Use removeGroupMembers() to delete selected members. Use addMembersToGroup() to add new members.
Thanks,
Can you explain in details how can I use groupMembers(), removeGroupMembers() and addMembersToGroup() using grid
Use a!groupMembers(groupId) to store members in a local variable.Display members and enable selection using a grid with checkboxes.Use a!filter(members, selected) to get selected members for deletion.Loop through selected members and use a!removeGroupMembers(groupId, memberId) to delete each.Use a user picker and a!addMembersToGroup(groupId, userId) to add new members in a loop.Remember, security clearances are required for modifying groups, and error handling is recommended.
Hm ... there is no a!filter() function in Appian. And you cannot make multiple calls to a!addMembersToGroup() inside a safeInto.
As this might be confusing to Appian juniors, do you mind refining your answer?
Stefan Helzle said:And you cannot make multiple calls to a!addMembersToGroup() inside a safeInto.
To be fair though, it accepts multiple members, so unless one was trying to do the action for multiple people and multiple groups at the same time, there should be no issue.
Stefan Helzle said:there is no a!filter() function
Yeah i'm also having a hard time translating that one into something that would work on an interface. For a second I thought he might mean to filter on a!groupMembers(), but it doesn't take any filtering parameters.