Forum Discussion
Auto populate person field with current user - InfoPath
I've seen this done, so I know it's possible, but I just wasted an hour searching on the internet, hoping to figure out how to do it. I want the current user to be automatically added to the People field in my InfoPath form, so users don't have to look themselves up. This should be simple, but of course it's not... there should be a setting in the People or Group field in SharePoint to automatically populate the field with the current user. Similar to how I'm able to set the default for a date field to "Today." All I can find on the internet is overly complicated (and outdated) methods to do this, and none of them are usable for me. Please tell me there's a simple way to do this!
- SSantosCopper Contributor
Pieter Veenstra, I am using SharePoint Online/Office 365 - is there another way to accomplish this? I was told we have E3 license but I was not able to access the path. I have admin rights.
https://myHostSite/sites/mySite/_vti_bin/UserProfileService.asmx
Are there any settings, on SP, I need to enable to access it? Thanks.
-----
Edit: Nevermind. I got it to work by using UserName() as the default value of the people picker (AccountID).
- Daniel PaulCopper Contributor
Hi. How did you get the 'UserName()' function to stet the value of people picker field? I tried doing this and it simply won't set.