Hi, I have two groups; admins and supervisors. Admins can only key transac

Hi,
I have two groups; admins and supervisors. Admins can only key transactions; supervisors can key and approve transactions. A supervisor is not allowed to approve a transaction that they keyed. When I assign a task to the supervisors group is there a straightforward way of excluding a specific user, please?

I can impose restrictions on the actual input form but am interested if there’s anything I can do at the assignment stage.

Thanks
Karl
...

OriginalPostID-102543

OriginalPostID-102543

  Discussion posts and replies are publicly visible

  • You can retrieve the members of the supervisors group and exclude the supervisor who keyed the transaction with the following rule definition:

    difference(getdistinctusers(topeople(ri!supervisorGroup)),{ri!supervisorToRemove})

    Make sure to save the user who keyed the transaction when they submit that task, so you can use that value in the above rule. Hope this helps! Keep in mind the assignment would now be to the list of users versus a group, as this could affect how you are reporting on your tasks.
  • Thanks, works nicely! I'm conditionally returning a group or users:

    =load(
    local!oldUsers:getdistinctusers(topeople(ri!supervisorGroup)),
    local!newUsers:difference(local!oldUsers,{ri!supervisorToRemove}),
    if(
    length(local!oldUsers) = length(local!newUsers),
    ri!supervisorGroup,
    local!newUsers
    )
    )