Get ID from people picker

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
charles267
Posts: 20
Joined: Wed Dec 23, 2015

01 May 2018

Is there a way to get the ID of the user chosen in the people picker? Thanks!

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

02 May 2018

Dear Charles,
Please, try the following code:

Code: Select all

fd.field('User').control('ready', function() {
  alert(fd.field('User').value()[0].EntityData.SPUserID);
});
It should work in almost all cases, but there is a chance that some users won't contain this information, so it does need testing.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests