none
How to autopopulate value in people picker based on the selection of values from two dropdown lists values in form RRS feed

  • Question

  • Hi,

    In my infopath form i have two dropdown list fields and one people picler filed. when i selected values from the two dropdowns, i need to autopopulate the value in people picker. these values will come from the sharepoint list.

    the list contains single record for each employee ex: department (dropdown- data from master sharepoint list), product (dropdown- data from master sharepoint list)

    another list contails employee data with columns as department,product,employee.

    In the form when user selected department,product values from dropdowns, i need to autopopulate that value in people picker field.

    Please help me, if anyone can know about this.

    Thanks

    Raju

    Monday, October 28, 2013 11:18 AM

Answers

  • Hi,

     

    The people picker column has three fields: DisplayName, AccountID and AccountType.

    The following are the details steps for the three fields, you can check with your steps.

    To the DisplayName, you should do some actions as below.

    1.        Right click the DisplayName, click the Properties.
    2.        In the Properties dialogue, in the Default value, click the fx button.
    3.        Click the Insert Field and Group, select the DisplayName under the employee, then click the Filter Data.
    4.        Click Add button, in the first text box, select “select a field or group…”, then select the external data source under Data source.
    5.        Select the department under the dataFields.
    6.        Select is equal to in the second text box.
    7.        Choose the Select field or group in the third text box, then select Main in the under Fields, select the department in the form, click OK.
    8.        Then click the And button, behind the third text box.
    9. Click the select a field or group…in the first text box, then select the external data source under Data source.
    10. Select the product under the dataFields.
    11.    Select is equal to in the second text box.
    12. Choose the Select field or group in the third text box, then select Main in the under Fields, select the product in the form, click OK.
    13.    Click OK in the Specify Filter Conditions.

    To the AccountID, you should do the below actions.

    1.        Right click the AccountID, click the Properties.
    2.        In the Properties dialogue, in the Default value, click the fx button.
    3.        Click the Insert Field and Group, select the AccountID under the employee, then click the Filter Data.
    4.        Click Add button, in the first text box, select “select a field or group…”, then select the external data source under Data source.
    5.        Select the department under the dataFields.
    6.        Select is equal to in the second text box.
    7.        Choose the Select field or group in the third text box, then select Main in the under Fields, select the department in the form, click OK.
    8.        Then click the And button, behind the third text box.
    9. Click the select a field or group…in the first text box, then select the external data source under Data source.
    10. Select the product under the dataFields.
    11.    Select is equal to in the second text box.
    12. Choose the Select field or group in the third text box, then select Main in the under Fields, select the product in the form, click OK.
    13.    Click OK in the Specify Filter Conditions.

    To the AccountType, you should do the following steps.

    1.        Right click the AccountType, click the Properties.
    2.        In the Properties dialogue, in the Default value area, type the "User" in the value text box.

    Thanks & Regards,

    Jason 

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.



    • Edited by JasonGuo Wednesday, October 30, 2013 6:05 AM
    • Marked as answer by Lindali Thursday, November 7, 2013 12:50 PM
    Wednesday, October 30, 2013 1:51 AM

All replies

  • Hello,

    You have to use _vti_bin/userprofileservice.asmx to auto fill the people picker in infopath form. You need to pass user domain name in userprofileservice to get accountId, user and preferred  name from service.

    Follow this:

    http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=178

    Hope it could help


    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

    Tuesday, October 29, 2013 9:14 AM
    Moderator
  • Hi Raju,

    According to your post, my understanding is that you wanted to autopopulate value in people picker based on the selection of values form two dropdown lists values in form.

    You can refer to the following steps:

    1.        Click Customize Form in the ribbon of the work order form list.
    2.        Add the equipment list as an external data to the InfoPath, the department, product and employee columns should be included.

    http://office.microsoft.com/en-in/infopath-help/add-a-connection-to-receive-external-data-HA101821256.aspx

    1.        Right click the department lookup column, click Drop-Down List Box Properties. Select the external data source created in step2 behind Data source.
    2.        Click Select XPath behind Entries, click department column, click OK button.
    3.        Right click the product lookup column, click Drop-Down List Box Properties. Select the external data source created in step2 behind Data source.
    4.        Click Select XPath behind Entries, click product column, click OK button.
    5.        Click the employee column, in the right Fields area, click Show advanced view.
    6.        Click the employee column, right click the DisplayName, click Properties.
    7.        Click Select XPath behind Value, click Insert Field or Group, click the DisplayName under the employee,  click the FilterData.
    8.    Click Add, select “select a field or group…” in the first text box, select the external data source created in step2 behind Data source.
    9.    Click the department under the dataFields.
    10.    select is equal to in the second text box, click Select field or group in the third text box, then select Main in the Fields, click department in the form, click OK.
    11.    Then repeat the steps 8~12 with  the AccountId and AccountType.
    12.    Publish the form to SharePoint.

    After that, value in people picker will be autofilled based on the selection of values form two dropdown lists values in form.

    Thanks & Regards,

    Jason 

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Tuesday, October 29, 2013 9:32 AM
  • Dear Jason,

    Thanks for ur procedure...but it is not working...see the below lists are which i am trying

    Department            Product                                UsersList

    -----------===       ------------                      ------------------------------------------------------------------

    A                                  A1                            A                    A1                      User1(People picker filed)

    B                                  B1                           A                    B1                       User2(People picker filed)

    C                                  C1                           B                    B1                        (People picker filed)

    In the infopath form i have create Dropdown lists for Department,Product and created the data connections and data for department and product is binding perfectly. and created people picker "Employee" in the infopath form

    My problem here is, when user selects "A" from drop down department and "A1" from Product dropdown list in the infopath form, i need the retrieve the record from UsersList and bind the user "User1" to Employee people picker in the infopath form. here i am unable to populate the user1 in infopath people picker.

    Please help me, if any ideas.

    Thanks

    Raju


    Tuesday, October 29, 2013 1:31 PM
  • Where is the User List and where are the users coming from? As far as I know, you have to create a mapping between Product and Users or Department and Users. There has to be another mapping between Department and Product. When you are doing cascading selections, there is a source based on which you are going to filter the results. I do not see any mapping of that sort in your design.

    So to start, keep Department list as it is. In your Product list, create Department column and do lookup from Department list. In User List, create a mapping of product and Users.

    Another thing, People picker can only be populated with SharePoint Group or All users in SP. The source of people picker cannot be another list.


    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

    Tuesday, October 29, 2013 5:43 PM
  • Hi there,

    below proposed solution works well on a SharePoint list. You may use SharePoint list instead of Infopath form.

    1. Create two SharePoint Groups and add respective users in each of them.
    2. Create a List.
    3. Create two columns, of type Person or Group.
    4. for each of the above columns select "Choose from" in Additional column settings section, as "SharePoint groups" and select appropriate SharePoint groups created in step 1.

    thus when users open form, i.e. http://sitename/lists/listname/NewForm.aspx , the two columns created in step 3 have their address book pre-populated with users from SharePoint groups created in step 1.

    let us know if this helps you.


    Naveed.DG MCITP, MCTS -SharePoint 2010 Administrator "Vote As Helpful" If it helps!!

    Tuesday, October 29, 2013 10:02 PM
  • Hi,

     

    The people picker column has three fields: DisplayName, AccountID and AccountType.

    The following are the details steps for the three fields, you can check with your steps.

    To the DisplayName, you should do some actions as below.

    1.        Right click the DisplayName, click the Properties.
    2.        In the Properties dialogue, in the Default value, click the fx button.
    3.        Click the Insert Field and Group, select the DisplayName under the employee, then click the Filter Data.
    4.        Click Add button, in the first text box, select “select a field or group…”, then select the external data source under Data source.
    5.        Select the department under the dataFields.
    6.        Select is equal to in the second text box.
    7.        Choose the Select field or group in the third text box, then select Main in the under Fields, select the department in the form, click OK.
    8.        Then click the And button, behind the third text box.
    9. Click the select a field or group…in the first text box, then select the external data source under Data source.
    10. Select the product under the dataFields.
    11.    Select is equal to in the second text box.
    12. Choose the Select field or group in the third text box, then select Main in the under Fields, select the product in the form, click OK.
    13.    Click OK in the Specify Filter Conditions.

    To the AccountID, you should do the below actions.

    1.        Right click the AccountID, click the Properties.
    2.        In the Properties dialogue, in the Default value, click the fx button.
    3.        Click the Insert Field and Group, select the AccountID under the employee, then click the Filter Data.
    4.        Click Add button, in the first text box, select “select a field or group…”, then select the external data source under Data source.
    5.        Select the department under the dataFields.
    6.        Select is equal to in the second text box.
    7.        Choose the Select field or group in the third text box, then select Main in the under Fields, select the department in the form, click OK.
    8.        Then click the And button, behind the third text box.
    9. Click the select a field or group…in the first text box, then select the external data source under Data source.
    10. Select the product under the dataFields.
    11.    Select is equal to in the second text box.
    12. Choose the Select field or group in the third text box, then select Main in the under Fields, select the product in the form, click OK.
    13.    Click OK in the Specify Filter Conditions.

    To the AccountType, you should do the following steps.

    1.        Right click the AccountType, click the Properties.
    2.        In the Properties dialogue, in the Default value area, type the "User" in the value text box.

    Thanks & Regards,

    Jason 

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.



    • Edited by JasonGuo Wednesday, October 30, 2013 6:05 AM
    • Marked as answer by Lindali Thursday, November 7, 2013 12:50 PM
    Wednesday, October 30, 2013 1:51 AM
  • Dear Jason,

    I did the settings upto 13 step for "DisplayName" and after click "OK" under "Specify Filter Conditions", then I did click on "OK" under "Filter Data", then i did click "OK" under "Select a Field or Group" to save the settings and to do the same for "AccountId", but it is giving error message "Afilter Can not be applied to the currently selected field. Select a differet field".

    Please help me to resolve this issue.

    Thanks

    Raju

    Wednesday, October 30, 2013 5:58 AM
  • These pictures are blurry do you have clearer images? I need the instructions if I am populating based on one dropdown field (Assessment Unit)
    • Edited by CDFranklin Tuesday, July 2, 2019 2:31 PM
    Tuesday, July 2, 2019 2:29 PM