cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rdevine
Level: Powered On

two deep lookups

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?

2 REPLIES 2
rdevine
Level: Powered On

Re: two deep lookups

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?

Community Support Team
Community Support Team

Re: two deep lookups

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

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,578)