I have create an InfoPath form that uses the Userprofileservice.asmx web service to retrieve the information form the AD. I have used a .UDCX file store the data connection. My environment is SharePoint 2013 with InfoPath 2013.
I wanted to view the First Name, Last Name and Preferred Name on in some text boxes. So I have used the below filters
First Name - Value[Name = "FirstName"]
Last Name - Value[Name = "LastName"]
Preferred Name - Value[Name = "PreferredName"]
The XPaths are as below.
First Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "FirstName"]
Last Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "LastName"]
Preferred Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "PreferredName"]
This SharePoint site uses Claims based authentication.
But when I published the form to SharePoint I get
First Name - SPPrdAdmin
Last name - EMPTY
Preferred Name - SPPrdAdmin
I cannot understand what I have done wrong.
Please could someone help on this?
Thanks and regards,
Chiranthaka