Skip to main content

Notifications

Community site session details

Community site session details

Session Id : hoBVeNYxPG33ubMiKgl7BQ
Power Apps - Building Power Apps
Answered

Linking two Sharepoint lists in edit form using a lookup

Like (0) ShareShare
ReportReport
Posted on 16 Oct 2020 18:32:18 by 10

Hello everyone,

 

I am fairly new to Power Apps and I need your help.

 

I have two Sharepoint lists. One is called 'Order form' and has following fields/columns: Order date, Employee number, Employee name, Cost center, Job description, Clothes, Amount, Size, etc. This list is currently empty and will be filled with the data coming from the Powerapp form. The other list is called 'Personnel list' and has following fields: Employee number, Employee name and Cost center.

 

I've already created a Power Apps based on the fields of the 'Order form' list. In the EditForm people have to fill in the Employee number (this is unique for each employee). This Employee number field has already been linked to the 'Personnel list', so people can choose one of the Employee numbers stored in that list via a dropdown. However, I would like the Employee's name and his/her Cost center to appear automatically in the EditForm when someone selects a certain employee number.

 

Does anyone know how to accomplish this?

Personnel list is updated each week. Is that problematic?

 

Thanks in advance!

 

Sarah

  • Sarah4 Profile Picture
    10 on 20 Oct 2020 at 19:02:20
    Re: Linking two Sharepoint lists in edit form using a lookup

    Hey,

     

    I was able to solve it. Thank you very much!

     

    Kind regards,

    Sarah

  • Sarah4 Profile Picture
    10 on 20 Oct 2020 at 18:59:28
    Re: Linking two Sharepoint lists in edit form using a lookup

    Tried it at work today and it works!

     

    Thank you very much!

     

    Kind regards,

    Sarah

  • v-yutliu-msft Profile Picture
    on 19 Oct 2020 at 10:04:02
    Re: Linking two Sharepoint lists in edit form using a lookup

    Hi @Sarah4 ,

    Do you want to get related Cost center value based on the selection of Employee number?

    Could you tell me:

    1)whether  Employee number field is lookup type in 'Order form' list or not?

    2)what is Cost center field data type in 'Personnel list'?

    3)where do you want to display the related  Cost center value?

    I assume that yes and display in a label.

    If so, you could set like this:

    1)the drop down's Items for Employee number field:

    Choices('Order form'.'Employee number')

     2)label's Text for Cost center:

    LookUp('Personal List', 'Employee Number'=Dropdown1.Selected.Value ,'Cost center')

     

     

    Best regards,

  • Verified answer
    eka24 Profile Picture
    20,921 on 16 Oct 2020 at 21:08:28
    Re: Linking two Sharepoint lists in edit form using a lookup

    You can use Lookup function to achieve that. In the field which the name will populate, put in the default;

    LookUp('Personal List', ' Employee Number=Dropdown1.Selected.Value ,'Employee Name')

     

    Or

    LookUp('Personal List', ' Employee Number=Dropdown1.Selected.'Employee Numbet' ,'Employee Name')

     

    Am assuming you are using a Dropdown to select the employee number

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started