Skip to main content
Nintex Community Menu Bar

People picker entry into JavaScript variable

  • April 19, 2017
  • 3 replies
  • 22 views

Forum|alt.badge.img+10

Hi all,

this should be an easy one, but I didn't get it running... sad.png I would like to write a  entry into a variable. What I did:

Within form (setting of the people picker control):

Store Client ID in Javascript: Yes
Client ID Javascript variable name: ppFK

Trying to get it into a variable (both without success):
var FK = new NF.PeoplePickerApi("#" + ppFK);
var FK = document.getElementById(ppFK);
Any help is highly appreciated! grin.png 
Cheers
mai-kel

3 replies

Forum|alt.badge.img+14
  • Scholar
  • April 19, 2017

you are almost there laugh.png

with PP API

var FK = new NF.PeoplePickerApi("#" + ppFK);
console.log('PP content: ' + FK.$elem.val());

without PP API

console.log('PP content: ' + NWF$("#" + ppFK).val());
‍‍

Forum|alt.badge.img+10
  • Author
  • Nintex Partner
  • April 20, 2017

Great Marian,

with that I managed to do what I wanted:

Button -> Settings -> Advanced -> Client click -> 

if(!confirm("Would you like to send the request to "+NWF$("#" + ppFK).val()+"?")){ return false; }

Thanks a lot!

Cheers

mai-kel


Forum|alt.badge.img
  • August 21, 2020
Hey,
Can you please help me with this scenario?
People picker id=orgIdCloseOut
text field id=exan
how to display people picker field user's display name into the text field?