Reset people picker to default value when Yes/No checkbox is set to No

  • 12 March 2019
  • 3 replies
  • 25 views

Badge +1

I am new to Nintex and I need a bit of help related to the default value of a PeoplePicker field.

My form has a checkbox Yes/No for delegation (screenshot 1). If it is checked (screenshot 2) I set up a rule (screenshot 4) to show another section that has a PeoplePicker for choosing the person for who we are filling the form (screenshot 3).

This PeoplePicker as the CurrentUser set as default (screenshot 5) because even if delegation is not checked I still need the same information to connect to my list columns.

Everything works fine except in the eventual case if someone checks delegation, chooses another person in the PeoplePicker but then regrets it and unchecks delegation. In this not probable but possible case, the PeoplePicker doesn't reset to the default CurrentUser.

I would prefer a solution using the rules or formulas but I am not against using only JS.

 

Screenshots

  1. Form when a new item is created (no delegation is the default)553iA6FBE5C92B59C8E3.png
  2. When delegation is checked555i204F7DD512172D2D.png
  3. Chose another person instead of the current user554i9F1DE2D734CE2CD3.png
  4. Validation rule for the PeoplePicker field552i6AD1EBBD20814A09.png
  5. Default value of the PeoplePicker556i85DC0A933CDA6F49.png

     

 

 


3 replies

Userlevel 5
Badge +14

this is only possible with a javascript.

you need to write a checkbox onchange handler within which you set people control value.

see some examples

https://community.nintex.com/t5/Nintex-for-SharePoint/Set-People-Name-based-on-other-field/m-p/58521/highlight/true#M48374

https://community.nintex.com/t5/Nintex-for-SharePoint/Update-control-field-in-form-with-data-from-SharePoint-list/m-p/7123/highlight/true#M6021

 

 

and description of PeoplePicker API

https://community.nintex.com/t5/Nintex-for-SharePoint/People-Picker-Extensions-Nintex-Forms/m-p/83770

Badge +1
Thank you very much.
Badge +2

@emha Hi, I know this is 4 years later but those links won’t work for me.  Are those posts still around? I’m looking for a way to update a person control field in a nintex form by using custom javascript

Reply