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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 63 members 4,604 guests
Please welcome our newest community members: