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?