GetUserProfile Data Connection &nbsp in returned text - InfoPath Dev
in

InfoPath Dev

GetUserProfile Data Connection &nbsp in returned text

Last post 06-20-2012 04:57 AM by wilkies0106aw. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-19-2012 08:18 AM

    GetUserProfile Data Connection &nbsp in returned text

    All,

    I'm using the GetUserProfile service to return various user attributes. I'm specifically using it to pull into an InfoPath 2010 form the MySite About Me. I've got this to work, yet the returned viewable text includes &nbsp i.e. System, XYZ  It doesn't seem to matter if the field is a text or a rich text box.  I've tried the following formula value: translate(Value[Name = "AboutMe"], " ", " ") . This however removes all &nbsp (s)

    How can I remove the " " and be presented with a space in the resulting field?

    Thanks

  • 06-19-2012 11:21 AM In reply to

    Re: GetUserProfile Data Connection &nbsp in returned text

    The translate function should work for your case.  Are you saying it removes all the &nbsps but doesn't add a space?
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 06-19-2012 11:32 AM In reply to

    Re: GetUserProfile Data Connection &nbsp in returned text

    In this case, the translate() function would replace all of the &s with spaces and remove all of the ns bs ps ss and ;s.

        An example    -->  A examle

    InfoPath doesn't provide a good way to do multicharacter string replacements, unfortunately.  Another forum user asked about this last week, and I gave him my suggestions in that thread:

    http://www.infopathdev.com/forums/p/22974/79487.aspx#79487

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-20-2012 04:57 AM In reply to

    Re: GetUserProfile Data Connection &nbsp in returned text

    Apologies one and all.

    The translate function appears to translate on a letter by letter basis, not on a word basis. Oh well. I couldn't find a find and replace either.

    My &nbsp s were appearing in the InfoPath "Preview in Browser" option only, then on a hunch I put the form into a SP WebPart page, the &nbsp s disappeared. I guess I'll have to 'publish' my forms much earlier.

    Thanks

    A

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