cancel
Showing results for 
Search instead for 
Did you mean: 
rigonzalez
Nintex Newbie

Convert string to person type

Jump to solution

Hi,

I have a SharePoint document library with a field named "Owner" (single line of text). I want to query the value from that field into a Nintex worfkflow, convert it (somehow) to a Person type value and return it to SharePoint as a valid person name into a new person type column named "newOwner". I tried calling a web service control but it's not being able to make the conversion, or at least I can't find the option there. Does anyone have an idea of how this could be done?

If I do a simple update item using the value from the Owner field, I get an error saying the input type is incorrect (text value to person type column). I thought SharePoint would simply read the text value and make the conversion like when using the people picker, but that was not the case.

Any advice you can provide will be greatly appreciated.

0 Kudos
Reply
5 Replies
praios81
Nintex Newbie

Re: Convert string to person type

Jump to solution

Hi Ricardo,

what value does your owner column have? Is it the name? Mail? Login name?

Prople picker columns will require you to give them the full login name to identify the user. If you only have the name, it will get difficult as you have to define a logic what should happen if you find more than one result because you find two people with the same name. If you have the mail it is much easier. 

Anyways, what you could try is to make an LDAP query, which will query your Active Directory. For examble if you have the mail, you can query the AD for users with that mail which should bring up one result. From this result you extract the sAMAccountname and use this to fill your people column. If it doesn't accept the sAMAccountname you might have to add the domain as a prefix domain\sAMAccountname for your new column value.

Hope this works.

Best regards

Enrico

Reply
rigonzalez
Nintex Newbie

Re: Convert string to person type

Jump to solution

Hi Enrico,

The problem that I'm facing is that my Owner field is a single line of text and I can't find a way to use Nintex to convert that string into a person type column and return it to a new SharePoint field of person type. Anny suggestions? I tried creating a string using ";#" as a delimiter but have not being able to make it work.

0 Kudos
Reply
rigonzalez
Nintex Newbie

Re: Convert string to person type

Jump to solution

BTW, the Owner field contains a string in the First Name + Last Name format. Eg. "Ricardo Gonzalez". In the image inserted you can see how SharePoint does recognice my account by typing first name + last name.

0 Kudos
Reply
praios81
Nintex Newbie

Re: Convert string to person type

Jump to solution

While entering the name into the people picker field, SharePoint queries the user profile and checks for the login name of possible found users. After you picked one person of the selection (multiple users with the same name may exist) it will save the login name to the people picker field. It will however keep displaying you the display name.

When setting the value with a workflow, we need to do both on our own: query the login name for the display name we have in the owner column and save this display name to the people picker column. For this you can perform the steps mentioned in my comment above.

Did you try this?

Best regards

Enrico

0 Kudos
Reply
rigonzalez
Nintex Newbie

Re: Convert string to person type

Jump to solution

Hi Enrico,

Thank you for your reply. It's starting to make sense, I never used the LDAP before, so I need to figure this out. Question: I'm doing some research on how to build the queries for the LDAP, but what's with the property value? I haven't found any articles that describe the use of this property value. Do you know any?

Thank you so much for your help on this, the LDAP seems to be the tool that I needed, I just need to look more into it and learn to use it.

0 Kudos
Reply