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 Apps
Unanswered

two deep lookups

(0) ShareShare
ReportReport
Posted on by 8

I have three entities; reader, hospital, and tray. I have linked the hospital entity to the reader and the reader to tray. The location of the reader contains the location. When the reader reads a tray I know where the tray is because the reader is in a fixed location.

 

How do I populate the location of the tray based on the reader that reads it. Does this require two lookups? look up the reader Id from the tray and compare it to reader ID on the reader then lookup the hospitalname on the reader?

Categories:
  • rdevine Profile Picture
    8 on at

    Here is a little more deteal on my scenario.

     

    I have an entity called 'Hospital'. This contains a picklist of hospital locations.

    I have an entity called 'Reader'. This contains a relationsional lookup of the hospital names.

    I have an entity called 'Tray'. This contains a relationsional lookup of the reader names.

     

    I want to display a trays location within the hospital. For this I need to look up the reader then lookup the hospital based on the reader.

     

    How do I accomplish this?

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi rdevine,

     

    According to your description, I created three custom entities in CDS, Hospital, Reader, and Tray.


    There is a picklist column “HospitalLocation” in the entity Hospital. Tray looks up to Reader, Reader looks up to Hospital.
    Then create connections from PowerApps to the three entities.


    On the app, add a Dropdown control, set its Items property as: Tray.TrayName.


    Then add a label, set its Text property as

    LookUp(Hospital,PrimaryId=LookUp(Reader,PrimaryId=LookUp(Tray,TrayName=Dropdown1.Selected.TrayName,Reader_.PrimaryId),Hospital_.PrimaryId),HospitalLocation)

     

    This function will return the location within the hospital according to the TrayName selected in the dropdown control.


    Hope this could be your reference.


    Best regards,
    Mabel Mao

     

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard