views:

480

answers:

1

I have been trying to user sharepoint designer to retrieve the user's full name and even the domain\username from the people pucker field but the problem is I tend to get numbers. It looks like the intetrnal Id. In my case I am getting 14 instead of domain\username from the list form's field.

Any idea on where I can get the dmain\username or even better the full name?

Thanks !!

I am using SharePoint Designer and Windows Sharepoint Services 3/SharePoint 2007.

Update :

I have managed to get the domain\username now. I just had to change the people picker's show field to ID. However now I am getting a weird prefix on my domain\username. I am getting this -1;#domain\username instead of just domain\username. Anybody know how I can overcome this?

Thanks !!

A: 

Hi,

I don't know how to avoid getting the information in that format, but I know how to get rid of the "1;#" part.

Assuming the variable "theName" contains "1;#domain\username", then you can do:

Dim poundSignIndex As Integer = theName.IndexOf("#") + 1 theName = theName.Substring(poundSignIndex)

That will remove everything before the "domain\username" part of the string.

Leon.

Leon Miura