Conditional show of Accept, Re-assign buttons

Certified Associate Developer

Hi, 

If a user is part of 2 groups: Assistant and Manager.

Same user who submitted a task as an Assistant shouldn't be able to access next task in the flow as Manager.

Is there a way not to show/disable the accept and reassign buttons when the same user tries to claim the task?

Or can we show an error message when trying to accept?

Any help/ideas are appreciated.

Thanks,
Keerthi

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to venkat Avuluri

    This should work fine if you can remove the user who has completed the 1st task (Save the tp!owner in a process variable from the 1st UIT output) from the list of users in the assignment of the task followed by the first one. below is a code you can reuse for that purpose.

    a!localVariables(
      local!groupMembers: a!groupMembers(group: cons!YOUR_GROUP_CONSTANT).data,
      remove(
        local!groupMembers,
        wherecontains(
          tostring(pv!ownerOne),
          touniformstring(local!groupMembers)
        )
      )
    )

Children