deewaker
Novice

reading person type column in a workflow variable

Hi Everyone,

I am querying a list which has person type column. This column I'm collecting in a collection say "ActivityOwner". Now I created a person type workflow variable to get the value from the collection. However, the collection is showing the data but the variable is coming as blank.

Can anyone suggest me on this?

Thanks in advance.

Regards

Deewaker

0 Kudos
6 Replies
rickbakker
Apprentice

Re: reading person type column in a workflow variable

Hi ‌,

Please show some more details and screenshots on the actions used. What platform are you using?

Cheers,

Rick

tphan
Novice

Re: reading person type column in a workflow variable

Are you trying to save back the value from the collection to another person column and getting no users upon save? I recently had this issue and you have to extract the value from the collection and save it as text and not as a collection.

If you use the workflow action of 'Get item from collection' you'll use the collection you've currently got your 'activityOwner' in and then use index value of 0 to get the first (should be only if you're only retrieving a single user) and then save it into another workflow variable, though this one should be text and not collection.

If you use that variable to set a list item, you should see better results. If this isn't your issue, please describe more of your problem.

Thanks,

-Trang

0 Kudos
bamaeric
Communicator

Re: reading person type column in a workflow variable

Try using a text workflow variable instead of a person workflow variable.  I've seen a similar issue that the text variable fixed.

TomaszPoszytek

Re: reading person type column in a workflow variable

What I also faced is that the field behaves differently depending on its settings and so does Nintex Workflow:

  1. If field is set to hold a single value, you can query it and output as a Person Variable.
  2. If field is set to hold multiple values (so you can put many users in the field), then the output must be set as a "Collection" (I'm taking the Working Email property) and then:
    1. Get element with index 0 from that collection. 
    2. That element from collection looks like this: ["email1@domain.com","email2@domain.com","email3@domain.com"].
    3. To have a valid "email" string I then regex ',' --> ';' and remove all quotes and brackets, so I end up with: email1@domain.com;email2@domain.com;email3@domain.com
    4. Such string you can later use to send mail, assign tasks or split and then foreach

Regards,

Tomasz

deewaker
Novice

Re: reading person type column in a workflow variable

Thanks Tomasz

This looks helpful. Let me implement this. I had to pick the person's email from the variable and then use the email address for sending notifications.

0 Kudos
TomaszPoszytek

Re: reading person type column in a workflow variable

Hey, please get back with the feedback. If my suggestion helped you please mark my answer as correct

Regards,

Tomasz

0 Kudos