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 / Get record ID from sel...
Power Apps
Answered

Get record ID from selected value in dropdown

(0) ShareShare
ReportReport
Posted on by 510

Hi. I have what might be a simple solution but I just cannot get my head around it.

I have a dropdown list (DocDropdown) which displays doctors names. The Items property is:

SortByColumns(
 JHB_Doctor_List.name1;
 "field_1";
 SortOrder.Ascending
)

Because there is the possibility that there might be more than one doctor with the same name, how do I get the record ID from DocDropdown.Selected.name1?

I need to use the record ID to lookup Practice Number etc.

At the moment I am looking up using the name but that returns the first match and is inaccurate.

I cannot use dependent dropdowns as the data is not clean and there are a lot of records with empty fields.

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @rwittels - the data source you're using to populate the Dropdown will need to return a record with multiple attributes (in your scenario, it will need to include the ID field).

    How is the below being populated?

     

    JHB_Doctor_List.name1
  • rwittels Profile Picture
    510 on at

    Hi. It is a SharePoint list and the app has a screen where doctors can be added, edited and removed. On a different screen, I need to allow the user to select a doctor name from a dropdown but to get the ID of that record in the background. Is there a way to do it?

  • Verified answer
    rwittels Profile Picture
    510 on at

    I just figured this out. Not sure why I haven't used Fields on a dropdown before. It's quite useful.

    I set my dropdown from JHB_Doctor_List.name1 to JHB_Doctor_List and then set 'Primary text' in Fields to name1.

    When a name is selected, I can store ID in a variable with DocDropdown.Selected.ID

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard