InfoPath DisplayName is Empty When Using UserName()

You created an InfoPath form, then added a text box to show the current users display name. Safe to assume you populated the text box using a rule and a set field value action. In the set field action, your Xpath might look like this:

xdXDocument:GetDOM(“My Data Connection”)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Employee_x0020_Name_x0020_2/pc:Person/pc:DisplayName[../../../d:Title = concat(“DOMAIN\”, xdUser:get-UserName())]

In my case, when the user accessed userName(), it was returning a value other than what is in Active Directory. UserName() would return Jdoe but Active Directory had the user listed as jdoe. This caused the text box to be empty in my form.

Look at the local user account on their machine.

How To Change User Account Name In Windows 8

Leave a Reply

Your email address will not be published. Required fields are marked *