User Information List - InfoPath Dev
in

InfoPath Dev

User Information List

Last post 05-13-2015 08:13 AM by snturner. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-11-2015 01:11 PM

    User Information List

    I am trying to hide a section based on the logged in user. I a, comparing the username() to the SP list populated with user names.

    I created a SP list that has user names listed in it. I then used these instructions on trying to return the user name, http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=172 by Laura Rogers.

    My problem is I am getting different formats in the username() field. I added a field to my form to show what is in the username() fields when I do a preview and when I look at the form on in SP.

    During a preview the format is Firstname.middleInitial.Lastname. When I open the form in SP, it is now similar to the account name, such as i:0#.w|SDSD\Firstname.middleInitial.Lastname.

    Using InfoPath 2010 and SP 2010

     What am I missing?

  • 05-12-2015 11:40 PM In reply to

    Hi SnTurner and welcome,

    This is the Claims-based authentication key. You can use the substring function to strip off the text up to the pipe character ('|').

    Laura Rodgers is probably talking about InfoPath using SharePoint 2010 or 2007.

    But, no worries, it easy to fix with substring(username(), 7, string-length(username())) or something like that.   

    Best of luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 05-13-2015 08:13 AM In reply to

     Thank you sir. I will try this.

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