how to update a Group/People field with multiple user


Badge +11

Hello

I have a workflow which requests 2 approvals from different management.
The purpose is to have both their names in the People/Group field when they respond to the task.

The update item action does not allow me to specify more than one source.
In return I thought maybe using a Build String to set it as a text field and then convert to variable may work?

Anyway, I am hitting the wall and hope to get some support happy.png

What I did:

1) defined the following variables:

  • txt_LogPurchManager (single text)
  • coll_LogPurchManager (collection)
  • LogPurchManager (people group)

2) added a Build String as following:

Text:                    {WorkflowVariable:LogisticsManager};{WorkflowVariable:PurchasingManager}

Store result:         txt_LogPurchManager

3) added a Regular Expression action

Pattern:         ;

Input:            {WorkflowVariable:txt_LogPurchManager}

Store:            coll_LogPurchManager

4) added a Build String action

Text:             {WorkflowVariable:coll_LogPurchManager}

Store:            txt_LogPurchManager

5) added a Set Variable action

Set:               LogPurchManager

Equals:         txt_LogPurchManager (Display Names, Semicolons Delimated)

6) Finally used the Update Item to update field named Managers with LogPurchManager.

Any ideas what I am doing wrong? or what simplest method?


9 replies

Userlevel 4
Badge +12

Hi,

you shouldn't need the collection. Simply put a semicolon between the logon names and save it to a people field that has multiple items enabled should be enough.

216858_pastedImage_8.png

216859_pastedImage_9.png

Here's my build string command which saves the result to a text variable:

{WorkflowVariable:person1};{WorkflowVariable:person 2}

Afterwards I write the text variable's value into the Multi User field

Hope this helps

Best regards

Enrico

Badge +11

This is what I initially tried out, but got an error message.
Indeed, the People Group field is enabled to accept more than 1 user / entry.

Badge +11

Ok, I have added only a Build String and the Update Item.
However, the second user does not show up ... it is a Nintex form instead of a list!!!

the txt_logPurchManager is a variable set to "Single line of text"

Then the update item simply says update the Manager (column: People / Group) with the txt_PurchLogManager.

By default it set to As String and when changing to Display Names, Semicolon Delimated < the workflow does not run and shows an error something like ... wrong input bla bla bla.

Anyway, the Nintex form does only show one user when the workflow is complete.
Ideally it should show username1; username 2 in the Manager's field.

By the way, the logistics Manager and purchasing Manager are not manually entered in the form!
Instead, I run 2 queries to pull up the relevant information required whereby they are stored to the variables as defined above.

Badge +11

Also,

if I set the Update Item to use the Display Names, Semicolon Delimated it through the error;

Coercion Failed: Unable to transform the input lookup data into the requested type

Therefore, I am lost of options.

Again, I do not have 2 PoG fields where the usernames are manually entered!

Instead, I run a query which saves the user's information into the txt field: LogisticsManager and PurchasingManager.

 

 

Badge +11

Would appreciate if you NINTEX team can support?!

Badge +11

Here is the process of the workflow where I am trying to show 2 managers name into one People Field.

Also see PDF attached.

NOTES

For testing purposes I send the txt_LogPurchManager variables via the email and the result is this:

i:0#.w|domainusername001;i:0#.w|domainusername001

 

In this case I am the approver for both approval requests, hence why I appear twice.
However in the Manager (people field) only my name is appearing ONCE and not twice...

Does it matter if both approvers are the same person???
Just wondering by doing so, the second approver is automatically blanked out and maybe that is why the second person is not showing up?

Badge +11

Update.

I highly suspect that I been fooling myself by thinking "it is not working" but in fact it was only showing my name once because it cannot have multiple same username within the field!! Aaaarrrrrrrrghhhhhhhh... silly of me.

I need to double/triple confirm this.

Badge +11

CONFIRMED!

Yes, because I was the same approver (twice) that is the reason why I only saw my name once.
It is so frustrating ... such a small mistake and easy to be overlooked.

Thanks for your input Enrico.

Userlevel 4
Badge +12

Glad you found a solution!

Reply