Get User ID from User Field

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Дмитрий.Фоломеев
Posts: 2
Joined: Tue Aug 22, 2017

22 Aug 2017

How to get the value of the user ID through the user field.
The object fd.field('userField') contains this value in defaultValue:
fd.field('userField')[0]. all . ctl00$ctl50$g_e496deda_84a1_491b_8b53_e9b0f9000bc3$_x041d__x0435__x043f__x043e__x04Field .... defaultValue .

Perhaps there is a function to get this parameter? (fd.field('userField')[0].getAttribute("defaultValue") not work)

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

22 Aug 2017

Hello, Dmitry!
Unfortunately, it is not possible to get user ID from the user field.
You can get user login from user field and then use it to get the ID with this - https://msdn.microsoft.com/en-us/librar ... 45233.aspx
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests