cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aah
Helper III
Helper III

LookUp formula not working

I have a form in which one of the text labels uses this formula to get the department name.

aah_1-1669303340651.png

I cant figure out why but doesn't seem to work and the only error it shows is a delegation error.

 

Any ideas on what could be the issue?

6 REPLIES 6
EdViegas
Super User
Super User

Where are you using this code? Control/Property

I'm not sure in regards to control/property.

 

This is part of the page the form is on I just can't get it to display the department name.

aah_0-1669304240402.png

 

Drrickryp
Super User
Super User

@aah

Assuming that there is a gallery, (say, Gallery1) for selecting the person and the controls are in a form datasource: People and Item: Gallery1.Selected, the default of the textbox should be: 

LookUp(Department, ID=ThisItem. 'Department ID').'Department Name'

Thanks for the reply.

 

My form uses a data source that doesn't have a department ID field so I can't directly LookUp for that. Is there any workaround?

Drrickryp
Super User
Super User

What field in the people table stores the department? If you don't have one, you need to add one. 

The 'Department ID' field which is also in the Departments list.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,792)