web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Select value from two ...
Power Apps
Answered

Select value from two list which is the same

(0) ShareShare
ReportReport
Posted on by 50
Hi, i have would like to pull value from another list. My main list has a column name DIV/DEPT which is corresponding to the second list "Department". The DIV/DEPT and "Department" got the same value. In the department contains the details for the department. Is it possible to pull the department details when the value in DIV/DEPT is the same as "Department"? As attached are my sharepoint list.

Sharepoint1.PNG
List 1: Contains the value input by the user. Data type are single lines of text.
Sharepoint2.PNG
List 2 which is same as the one in list 1.

Sharepoint3.PNG
I would like to put the admin name to the list 1. I have tried to use lookup column but nothing shown. 
Categories:
I have the same question (0)
  • ShangKer Profile Picture
    50 on at

    Oh the value in list 1 is input from powerapps

  • LRVinNC Profile Picture
    2,297 on at

    Did you specify the column that you wanted to return from your lookup like this?

     

    Lookup(List2, Department = List1.DIV/DEPT).AdminName

  • ShangKer Profile Picture
    50 on at

    Where should i specify this?

  • LRVinNC Profile Picture
    2,297 on at

    That depends on how are you are trying to use it.  Are you trying to set the value on the screen in a PowerApps application or are you just trying to set the value in a SharePoint list?  You said there is a PowerApps application in which the value in List1 is being entered.  When it is entered, what do you want to have happen?

  • ShangKer Profile Picture
    50 on at

    When the user enter the DIV i want to get the admin name and email from the List2. Im trying to send an email to the admin when new record is added.

  • LRVinNC Profile Picture
    2,297 on at

    In that case I would set a global variable to the result of this lookup. Depending on how your input control for DIV/DEPT is set up you can probably set the variable either in the OnChange property or attached to a button if you are using one to save the DIV/DEPT. Syntax is Set(variablename, what you are setting the variable to),

    in this case the lookup I provided above. 

     

    Just a thought, you could also do this with a flow set up with a trigger on when a new record is added. 

     

  • ShangKer Profile Picture
    50 on at

    Yes i have thought of using flow to do this but i stuck at the get items part as i cannot understand how to tell the system to retrieve the admin name from list 2 where DIV/DEPT = "Department" to list 1. So now im trying do both from powerapp and also automate.

  • ShangKer Profile Picture
    50 on at

    Hi i have done the code and fixed the error warning but the name are still not appear in the sharepoint list. It would be great to have some help from you.Code.PNG
    This is the code in my powerapps.
    Name.PNG
    The primary list receive nothing.

  • Verified answer
    LRVinNC Profile Picture
    2,297 on at

    I see both a SubmitForm and a Patch.  Is the Patch updating the same date or additional data beyond what the SubmitForm is handling?  The syntax of your Patch seems strange.  If you are trying to update an existing record, the syntax would be Patch(eLeaveApp, First(Filter(eLeaveApp, <an expression to locate the record you want to update>)), { list of fields and values like you have for DateApply}) I don't understand what the 4 variables between Patch(eLeaveApp, and the opening curly brace are.  Here's the documentation on Patch showing the correct syntax to either create or update.  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

     

  • ShangKer Profile Picture
    50 on at

    Ouh I see where my errors are now thanks.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard