cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roguetomato
Regular Visitor

2nd Level Lookup Retrieval

How do you retrieve a data if it's in the 2nd level lookup like the example below?

Company Entity
   '-----> Employee Lookup
               '-----> Health Record Lookup
                             '------> Last Checkup Date

So, basically, I want to retrieve the Last Checkup Date of the employees of the Company.

I tried this but it gives me an error saying "Multiple levels of many-to-one relationship expansion aren't supported."

ClearCollect(CompanyHealthRecord, Filter(Company, Employee.HealthRecord.LastCheckupDate < Now()));

Any workaround for this? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @roguetomato ,

 

For the time being, PowerApps doesn't support to look up a lookup field yet.

If you want this feature, please submit an idea to PowerApps Ideas Forum:https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Sik

 

View solution in original post

4 REPLIES 4
v-siky-msft
Community Support
Community Support

Hi @roguetomato ,

 

For the time being, PowerApps doesn't support to look up a lookup field yet.

If you want this feature, please submit an idea to PowerApps Ideas Forum:https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Sik

 

Hi @v-siky-msft,

 

Is there a workaround to do this 2nd level lookup ?

 

Thanks in advance ! 😉

 

Bests Regards.

Did you find any solution to this ??

ViswaMullapudi
New Member

Hi,

I found some work around to get the value for 2nd Level Lookup.

Try your query as below, considering EmployeeID is your unique identifier in Employee entity and have used ThisItem considering you are using  value from Gallery.

ClearCollect(CompanyHealthRecord, Filter(LookUp(Employee, EmployeeID = ThisItem.Employee.Employee,HealthRecord).LastCheckupDate));

 

I tried something for filtering dropdown list and it worked for me.

 

If(LookUp(Employee, EmployeeID = ThisItem.EmployeeID.EmployeeID, HealthRecord).Name = "XXXX", Filter(Choices(HealthRecord.Optionset'), Text(Value) in ["aaaa"]),
LookUp(Employee, EmployeeID = ThisItem.EmployeeID.EmployeeID, HealthRecord).Name = "ZZZZ", Filter(Choices(HealthRecord.Optionset'), Text(Value) in ["bbbb"]),
Filter(Choices(HealthRecord.Optionset'), Text(Value) in ["ccccc", "ddddd", "eeeee"]));

 

Cheers 🙂

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,526)