Solved

InfoPath lookup field to SharePoint

Posted on 2012-12-25
6
2,124 Views
Last Modified: 2012-12-29
I have a SharePoint 2010 list, EmployeeList. It has fields EmpNo and Department.
I have another list, Drivers in the same site and it also has EmpNo along with other informaiton.
I would like to create an InfoPath form to enter new drivers.
In it, I would like a drop-down for the DriverID field and a text box for Department. The driver id is the employee number. Therefore, the drop-down in DriverID should display all values from EmpNo in EmployeeList. In the form, as soon as I choose one employee number from the drop-down in DriverID, I want the Depatment text box to automatically populate with the corresponding department from EmployeeList.
How can I achieve this?
0
Comment
Question by:MSOfficeExpert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:clayfox
ID: 38720440
You need to research "cascading dropdowns" and filters.

Good examples at www.infopathdev.com

You will create a data connection to the drivers list

Set up 2 dropdowns
have the second dropdown use the driver list
But have a filter so that empid equals the field of the first dropdown.
0
 
LVL 1

Author Comment

by:MSOfficeExpert
ID: 38720446
clayfox,

Can you check the link, it doesn't lead me to "cascading dropdowns"
0
 
LVL 28

Expert Comment

by:clayfox
ID: 38720467
When you get to infopathdev.com search on cascading dropdowns, or you can on any search engine.

I am on my phone at the moment but there are several good tutorials.
0
Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

 
LVL 1

Author Comment

by:MSOfficeExpert
ID: 38720478
I am looking for a solution in Experts Exchange. If I don't find one, I will research on my own.
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 total points
ID: 38720513
Hello,

I don't know why you don't want to click a link to another web site, but if you insist:

In the InfoPath form, create a new data connection to receive data and point it to the Employee list. Make sure to include the fields for EmployeeID and Department. Give it the name EmployeeList

In your main data source, you need a field for DriverID and one for Department.

Drag both fields to the form.

Change the DriverID control to be a dropdown. Edit the control properties and click "Look up values from an external data source".

In the Data Source field, select the EmplyeeList data connection.
Set both the Value and the Display name to be EmployeeID and close the dialog.

Create an action rule on the DriverID field. The rule should fire whenever the field is changed.

Create an action to set another field's value.

Select the Department field in the Main data source as the field to be changed.

In the Value box click the formula button. In the next dialog click "Insert Field or Group".

Select the EmployeeList data source, open the Data Fields node and click on "Department" and then click the button "Filter Data". In the next dialog click "Add".

In the Filter dialog, set the first value field to EmployeeID of the EmployeeList data source: click "Select field or group", select the data source EmployeeList, open the Data Fields node and select the field EmployeeID.

Set the comparison operator to "is equal to".

Set the second value field to DriverID of the Main data source: click "Select field or group", select the Main data source and select the field DriverID.

Click OK on all the dialogs.

cheers, teylyn
0
 
LVL 1

Author Closing Comment

by:MSOfficeExpert
ID: 38729108
teylyn, I didn't want to click on the link because it leads me nowhere - the contents are unrelated to what I am looking for. Your solution - your detailed solution is exactly what I was looking for - Thank you!
0

Featured Post

Office 365 Training for Admins

Learn how to provision tenants, synchronize on-premise Active Directory, and implement Single Sign-On with these master level course.  Only from Platform Scholar

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question