How to assign a task to 3-4 users of different group?

I have a user input task , I want to assign task to 3-4 users dynamically using if else

for example:

local!flag:true

local!myArray: {
{ name: "Aish", category: "A" },
{ name: "Jenny", category: "A" },

},

if local!flag is true, assign task to users in local!myArray ,

else assign task to a single user i.e loggedinuser()

Please help

  Discussion posts and replies are publicly visible

Parents
  • Hi , I'm not sure if you want to dynamically create the same task for 4 different users or if you want to only assign (and expect only one to accept it) to 4 different users of different groups. For the first option, you should consider Stewart's approach. If you're looking for the 2nd option, there is nothing preventing you to have that assignment logic in a expression rule and then use it in the Assignment Tab of your User Input Task. Something as simple as the code below would do the trick. Hope it helps

    a!localVariables(
      local!flag: true,
      local!myArray: {
        { name: "username1", category: "A" },
        { name: "username2", category: "A" },
        
      },
      if(
        local!flag,
        touser(local!myArray.name),
        loggedInUser()
      )
    )

  • Pedro, I am using MNI on a group of assignees and it is working fine.  But when I add a new member to the group then the new member automatically does not get a copy of the task!!!  Is this the expected behavior?  (I know the new member would receive the task if I didn't use MNI unless some other group member has already accepted the task).

Reply Children
No Data