Invalid People Picker entry - subsequent queries fail - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Invalid People Picker entry - subsequent queries fail

Last post 09-19-2016 10:36 AM by Carphunter. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-16-2016 02:28 PM

    Invalid People Picker entry - subsequent queries fail

    I've got a people picker added to a form in InfoPath 2013.

    When that field changes, I'm automatically setting a second field which would use the data to do a person lookup and get some more info.

    Problem I've got is that if the entry in the People Picker is bad (meaning someone typed part of a name...it didn't resolve), the query will still fire, and I'll get an error popup.

     I need to somehow only set the second field from the people picker if the people picker has a resolved name.

    Is there any kind of rule or validation for that that I can put inline before the next field set and query? 

  • 09-17-2016 06:59 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    You might want to drag the fields bound to the people picker onto a form to confirm this - but I wonder if the display name field will be blank if the account id doesn't resolve. Probably worth checking. :)
    Hilary Stoupa

  • 09-19-2016 09:57 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    Thanks for the idea.  first shot it doesn't work because when that name doesn't resolve, it appears to pass the typed in entry as the display name.

     Another issue is that I'm autosetting a text field to "accountid" from the picker.   If the name doesn't resolve, it's grabbing the accountid of the logged in user.

    so... examing what chain of operations I might be able to do get this to fire.   maybe another step that says if picker accountid = logged in user accountid, don't run. 

  • 09-19-2016 10:03 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    So, the rule on the field with the default that has the account id runs your query? I wonder about having another field, not on the form, that has a default to the display name. Put the rule that runs the query on that field instead (I'm assuming the account id changes, then the display name changes....) and don't run the query if the display name = the account id?
    Hilary Stoupa

  • 09-19-2016 10:10 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    sort of what I'm trying..

     i'll keep you posted... it's just tough to expose all the fields to see what they are doing, and then getting the appropriate rules in place to stop or proceed. 

  • 09-19-2016 10:21 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    If this is a browser form, maybe set it filler temporarily and add popup dialogs in your rules so you can see the order of occurrence when you preview. :)
    Hilary Stoupa

  • 09-19-2016 10:36 AM In reply to

    Re: Invalid People Picker entry - subsequent queries fail

    Think I've got it. I was thrown off because a test I did to see if logged in accountid and people picker accountid were equal wasn't constructed correctly.  basically, in our setup, username reports domain/username.  people picker accountid doesn't include the domain, so comparing these two doesn't produce a match... and the STOP rule I made didn't work.

    For other purposes, I have a field that is stripped of that domain name, so when I compared that to the people picker accountid, I got a match.

     

    So, to stop the error popup, I have to make sure I don't do a query that depends on a people picker value that didn't resolve.

    Base condition - I have a a text field set to take the accountID of the people picker. It auto refreshes its value whenever the picker value changes

    first rule on that field says if that field (the current accountid from the people picker) = the cleaned account name (no domain) of the username function for the logged in user, STOP.  This prevents a query from running based on the non-resolved people picker

    subsequent rules go ahead and do the query since the people picker has resolved, and its value no longer equals the logged-in user's value

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.