Best way to get all groups a user is member from

 Hi Community,

For a task report, I would like to automatically pop-up the task assigned for the user, by checking all the tasks that are assigned to a group where the user is member of. I though there might be a function that does that already, but I didn't find it.

Before I go to the implementation of something, I would like to ask if you are aware of any function that could make this more efficient.

It should consider

1) One Application with many groups.

2) loggedin user might be part of none, one or many groups

2) The number of groups and tasks might change later (so avoid hardcoded is isusermemberofgroup(cons!GROUP))

Thanks for sharing your thoughts!

 

 

 

 

  Discussion posts and replies are publicly visible

Parents
  • There is a plug-in available in the Appmarket here in the Community called 'People Functions' which contains, amongst a number of other functions, 'fn!getgroupsformemberuser'. This returns all the Groups the User is a member of, irrespective of whether a direct or indirect member. I presume once you have that list you intend to interrogate each Group to see if there any Tasks that are assigned to that Group?
Reply
  • There is a plug-in available in the Appmarket here in the Community called 'People Functions' which contains, amongst a number of other functions, 'fn!getgroupsformemberuser'. This returns all the Groups the User is a member of, irrespective of whether a direct or indirect member. I presume once you have that list you intend to interrogate each Group to see if there any Tasks that are assigned to that Group?
Children