'Infopath >> How to get user name for People/Group picker?

I have few people/group picker on a infopath form. It's working fine but it populates the field with username (without the domain and that's fine).

However, I need this to be "Display Name" or full name instead of user name. Now I know a long way to set this up based on hooking to userprofile web services.

If there is no out box way then I guess I can have c# code to get the name without calling the webservices. Basically, I want to minimize server/client communication.



Solution 1:[1]

Just put UserName() as default value for DisplayName and AccountId. That works for me.

If you still have problems this is way to go: http://claytoncobb.wordpress.com/2009/06/21/userprofileservice-extended/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 malibeg