Forum Discussion
Auto populate person field with current user - InfoPath
It's been awhile and we're no longer using InfoPath so I hope my recollection below is correct. In form load, add a rule that if ID is blank (i.e. new form), set a text field (i.e. CurrentUser) value to equal UserName(). Then set the people picker (AccountID) value to this field (CurrentUser). If I remember correctly, I had to use substring to remove any part of UserName() result to just give me the email address before I could use it as the value for the people picker. Hopefully this helps. If I find a copy of the old xml file, I'll try to post the exact solution.
Yup, same here. It's weird...all the fields get set. I can even configure it all like that. Load the form, go into the people picker type a [space] and change focus and suddenly the user shows up in the people picker. It's like it loads all the data properly but never does that last callback/refresh to do the final load of the person into the people picker. It takes a manually change within the form for the person to be populated.