Forum Discussion

Allison Rizak's avatar
Allison Rizak
Brass Contributor
Jan 12, 2017

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!

9 Replies

    • SSantos's avatar
      SSantos
      Copper 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).

      • Michael Boonie's avatar
        Michael Boonie
        Copper Contributor

        I have the same issue: In fact, I can manually set the all three values of the repeating 'pcPerson' group (DisplayName, AccountID, and AccountType) and a repeating table bound to the repeating 'pcPerson' group shows the values that I set (which, after testing, I verified as equal to values I'd get if I actually used the People Picker control); yet the actual People Picker control stays blank!

         

        I did extensive testing to tell it's not quite "set," but it's still very confusing. Because one can't set a rule on a People Picker control, I used the time-honored trick of binding a text field ('strRequestorID') to the AccountID of the picker and setting a rule on THAT field. The rule--which apparently is being triggered--uses one of the values (DisplayName) from the Picker control to set a different value elsewhere; but the value being retrieved is blank, which is mighty confusing in itself, because the rules is only supposed to run when it's NOT blank!

         

        At this point, I'd even welcome a workaround, although I'd really like to know what's going on.

         

Resources