Having Trouble Getting FirstName and LastName in a text field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Having Trouble Getting FirstName and LastName in a text field

Last post 08-02-2013 08:12 AM by Sandy_Wood. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-01-2013 03:41 PM

    Having Trouble Getting FirstName and LastName in a text field

    I'm trying to pull username information from the SharePoint User Profile Web service. I can connect to the web service and get the information but the formula is not behaving. I've come up with

     

    "concat(Value[Name = "FirstName"], Value[Name = "LastName"],)" 

     

    It gives me this error:

    Expected value type: end-of-string

    Actual value: name
    "concat(xdXDocument:GetDOM("-->GetUserProfileByName<--")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "FirstName"], xdXDocument:GetDOM("GetUserProfileByName")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "LastName"],)"

     

    Are both FirstName and LastName in GetUserProfile?

  • 08-01-2013 11:58 PM In reply to

    Re: Having Trouble Getting FirstName and LastName in a text field

    Hi Sandy,

    If you use SharePoint 2010's http://site/_vti_bin/userprofileservice.asmx and specify the GetUserProfileByName it will return FirstName and LastName.

    More info: http://claytoncobb.wordpress.com/2009/06/21/userprofileservice-extended/

    Cheers!

    Patrick Halstead
    Project Manager at Qdabra
  • 08-02-2013 07:26 AM In reply to

    Re: Having Trouble Getting FirstName and LastName in a text field

     Hello Patrick,

    Thanks for the note back on my post. I have been using  GetUserProfileByName in my form. My issue seems to be with getting the formula right. In Clayton's blog, figure 15, I've been using that formula but it's giving me errors when I check the formula. I'm sure it's something I'm typing or not typing. Let me bang away at it some more.

  • 08-02-2013 08:12 AM In reply to

    Re: Having Trouble Getting FirstName and LastName in a text field

     I believe I found my problem. I needed to follow some steps exactly when creating my formula. I was successful when adding all the text and fields at creation time. Previously I added the FirstName and LastName fields and then would edit the formula adding 'concat', and all the parentheses, commas, etc. This never worked for me. Adding all the commands and fields at the same time worked.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.