Trouble with Person/Group picker - InfoPath Dev
in

InfoPath Dev

Trouble with Person/Group picker

Last post 06-11-2012 07:01 AM by stgiesbrecht. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-07-2012 08:10 AM

    Trouble with Person/Group picker

    I am using a Person/Group picker control for a form to determine who needs to approve it.  I hide the approval section if the currently logged in user is not equal to the value of the approver.  I am using the translate command to ensure that the case of both fields is the same.  I also used the substring "\" so that I stripped off the domain for the approver.  I am now seeing sometimes the domain is there and other time not, so when it is not the string comes up empty and does not display the approval section.  When I look at the XML file for two files this is what I am seeing:

    This one does not work 

    <my:review1>
       <pc:Person>
        <pc:DisplayName>[email protected]</pc:DisplayName>
        <pc:AccountId>DoeJ</pc:AccountId>
        <pc:AccountType></pc:AccountType>
       </pc:Person>
      </my:review1>

    This one works

     <my:review1>
      <pc:Person xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls">
       <pc:DisplayName>Doe, Joe</pc:DisplayName>
       <pc:AccountId>ACME\DoeJ</pc:AccountId>
       <pc:AccountType>User</pc:AccountType>
      </pc:Person>
    </my:review1>

    Not sure why the one that works has the extra line with schema in it.  We are using SharePoint 2010, Office 2010 and qRules 4 in the form.

    Any ideas on this.  Thanks, Scott

  • 06-11-2012 06:07 AM In reply to

    Re: Trouble with Person/Group picker

     Sorry, I'm a bit confused. You said "I stripped off the domain for the approver" and that "I am now seeing sometimes the domain is there and other time not". What do you obtain out of the box? Does the domain show or not? Why did you add a rule to strip off the domain?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-11-2012 07:01 AM In reply to

    Re: Trouble with Person/Group picker

    What I am doing is taking the value of the AccountID from the people picker and then comparing it to a field that is populated on form open using the User() function.  The User() function always comes back as just the user name without the domain, the people picker seems to vary in what is returned, sometimes with the domain and sometime without.  That is why I included the two different parts of the XML file, as they are consistent in what is there based on whether the domain portion is there or not.  I am not sure if it is a client install issue of Office 2010 or something else.

     I was able to create a rather long and complex if type formula to populate a field to check against, it tested if the field contained the domain (and "\") and then took just the user name and translated it all to lowercase.  Still would like to know if anyone knows why it returns different results.

     This is a browser based InfoPath 2010 form.

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