Skip to main content
Nintex Community Menu Bar

detect autocomplte in peoplePicker

  • July 3, 2018
  • 7 replies
  • 21 views

Forum|alt.badge.img+4

I want to listen to choosing a person at the peoplePicker - in order to start the form only after he has written his name.

How can I do it?

7 replies

Forum|alt.badge.img+14
  • Scholar
  • July 9, 2018

could you explain your business case in more details?

if you're populating a people control you already have to be in forms, what other form would you like to start?


Forum|alt.badge.img+4
  • Author
  • July 10, 2018

I am talking about show or hide controls according a function I make on the code.


Forum|alt.badge.img+14
  • Scholar
  • July 10, 2018

sorry, still no clue what you're trying to do/achieve...


Forum|alt.badge.img+4
  • Author
  • July 11, 2018

IO want to check if user on the prople picker exists on other list.

When usding a rule of lookup - checking if user is exist at other list (not specking about the need for finding him in a specific  view), and show or hide controls take a lot of time.

a good solution that wiorks fast is using ajax when the user has changed the value or just select at the people picker.

The only problem is that I don't detect it by click- choosing of a person,  but ust on "blur" and it's not enough sad.png


Forum|alt.badge.img+14
  • Scholar
  • July 11, 2018

using lookup() function the easiest/most straightforward way.

see eg. https://community.nintex.com/message/77277-re-can-i-lookup-a-person-in-a-table-based-on-a-people-picker-drop-down?commen… 

how big is your other list if you say it's slow?

have you got it indexed?


Forum|alt.badge.img+4
  • Author
  • July 12, 2018

I am sorry but it is slowly and demand other column in order  to check if the item is exist in one view or not (because lookout is not with view). 
Therefore there are 2 conditions to check - and it become very slow: something like 2 seconds for 600 items list!


Forum|alt.badge.img+14
  • Scholar
  • July 16, 2018

I'd recommend to focus on that performance issue first. if such a simple lookup is slow soon or later you will experience performance issues elsewhere

but ok. to capture click events on people picker control try following code

NWF.FormFiller.Events.RegisterAfterReady(function () {
          (new NF.PeoplePickerApi('#'+PPControl)).added(function(){
             NWF$('#'+PPControl ).siblings('div.ip-item:last').click(function(){
                 //fires when clicked on people picker control entry
                 console.log('click ip-tem')
             });
          });
          
          NWF$('#'+PPControl ).siblings('textarea.ip-input').click(function(){
              //fires when clicked in people picker control input box
              console.log('click ip-input');
          });
});

‌ people entry‌