<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>How to auto-populate Contact Selector based on dropdown list</title><link>https://www.infopathdev.com:443/forums/thread/74894.aspx</link><pubDate>Thu, 02 Feb 2012 20:49:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74894</guid><dc:creator>GloriaH</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74894.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74894</wfw:commentRss><description>I am relatively new to InfoPath and need some help setting this up (I am using SharePoint 2007 and InfoPath 2007):
 
When the user selects a region from the dropdown list, the name of the corresponding manager should be displayed. The form is receiving data from a SharePoint list. 
In the SharePoint list the fields are: Employee Name, Region
In the InfoPath form the fields are: BUManagerName, BUManagerRegion
  
I displayed BUManagerName in a text box. And I set the default value to the following:
@Employee_Name[@Region = BUManagerRegion]
  
There are 3 approval levels in total, and I set up the SP list and fields for the other 2 levels in a similar way.  All was working fine.
 
However, the client has now requested to use people pickers so that they can select a different manager than the one specified, if needed. I added 3 contact selectors (one for each approval level) and tried using the same default value as above for the DisplayName.  Also, I added a column in the SharePoint list for the Employee Account ID, and set a similar default value for the AccountId in the contact selector (e.g. @Employee_AccountID[@Region = BUManagerRegion] ). And set the AccountType to “User”.

When I open the form in the browser it is not working properly:
1.       When I select the regions, the form does not automatically display the manager names in the Contact Selectors.
2.       When I click on the “Check names” button in a contact selector, the form will update and display the manager names. HOWEVER, it always updates the other 2 contact selectors but not the one I am clicking on. For example, if I click on “Check names” in Contact Selector #1, it will update Contact Selectors #2 and #3.
 
What is the correct way to set this up? Also, I manually added the AccountIDs in the SharePoint list. Is there a way to automatically get that data in a Contact Selector based on the employee names provided in the SP list?</description></item></channel></rss>