How to Populate People Picker value on Child Item

rss

Posted by Jdubs - Sep 3 ’15 at 07:32

I'm using the following code to pre-populate information on a child form from the parent form (when using Related Item control):

 

//Pre-populate Information

fd.field('CheckType').value(window.top.fd.field('CheckType').value());

fd.field('CheckNumber').value(window.top.fd.field('CheckNumber').value());

fd.field('ProvisionBatch').value(window.top.fd.field('ProvisionBatch').value());

fd.field('Payee').value(window.top.fd.field('Payee').value());  <-- People Picker

fd.field('Payor').value(window.top.fd.field('Payor').value());  <-- People Picker

 

The code works great, except for People Picker fields.  The information passes as blank.

 

Is there a way to populate that information?

  • rostislav
    rostislav
    Moderator
    Member for: 6 years 6 months 26 days
    #1 by rostislav Sep 3 ’15 at 09:00

    Depending on what type of people picker you're using and what type of information you can use to identify users there are different ways to do this, please check http://formsdesigner.blogspot.com/2013/04/getting-and-setting-sharepoint-form.html For example, if you're using single server people pickers and want to use emails to identify users you can do:

    fd.field('Payee').value(window.top.fd.field('Payee').value().dictionaryEntries[0].Email)
    
Displaying 1 to 1 of 1 messages