Showing results for 
Search instead for 
Did you mean: 
New Member

lookup syntax error

I am new to power apps.  I am making a simple app that is connected to two small excel tables.  Most of the info is gathered from the main table (Jobs).  A few items are gathered from the auxiliary table (ParentProject).  Standard setup where the gallery which lists all the items in Jobs goes into a detail view of each job.  In the detail view I pull several pieces of info from the Jobs table including the name which I call "projects".  I need to cross reference the auxiliary table with a lookup function to show a little more data on the detail view.  Here is the problem.

When I create a data label I can get it to pull from the auxiliary table if I manually type in the text in the LookUp function.  for instance:

LookUp(ParentProject, PP = "1000 Museum", RITD)

Where PP is the lookup column and RITD is the return column in the auxiliary table.  But when I want this to happen automatically based on the value in the detail view I can't get it to work.  I have tried replacing the text with:

ThisItem.projects and ThisItem.projects.Text

I also created another datalabel called project_name that displays the correct value for the detail view and tried to reference that.  I have tried:

project_name, project_name.Text, proect_name.Value

None of it seems to work.  Ive spent several hours digging through the docs, but I can't see a clear exampl of where I am going wrong because lookup are rarely shown using two tables in the basic examples.  Any help would be appreciated...


Accepted Solutions

@robsmaze Pleased that it's working and glad to help!


Please remember to give a 👍 and accept the solution as it will help others in the future.

View solution in original post

Super User
Super User

@robsmaze could you share u'r screen and the items property of the control where u'r trying to do tuff like, ThisItem.projects

New Member

@CNT — Absolutely.  I have included the detail screen, a snap of the main table (Jobs) and a snap of the auxiliary table (ParentProject).  Thanks for looking at this.  I am sure it is a super easy syntax mistake on my part...

Hi @robsmaze 

Do the values in the projects column of the Jobs table match with the values in the PP Column in the ParentProject table? Just from the look of it they seem to be different. Could you please confirm.

New Member

@CNT they do - that’s why I’m using the lookup function.  The value of projects from the Jobs table have an exact match somewhere in PP in ParentProject table.  I need to get a couple of pieces of data from matching value in the PP column of the Parent Project table.  I know I’m connecting because if I manually enter a text value in the lookup it finds the correct value (that’s what I show in the pics)…. Ive tried a couple of other manual entries and it works.  

@CNT - Oh heck!!  You were right.  I was looking at a job that wasn’t set up in the ParentProject Table.  As soon as I tried a different one it worked just fine with ThisItem.projects.  Totally not paying enough attention!!!  Thanks so much for all your help and pointing out my silly error.  I guess I need to work on an error message that says “NO MATCH FOUND!!!”””

@robsmaze OK. Where do you have this code,

LookUp(ParentProject, PP = ThisItem.projects, RITD)

In which control and in which property? I'm trying to find what this ThisItem refers to.

@robsmaze Pleased that it's working and glad to help!


Please remember to give a 👍 and accept the solution as it will help others in the future.

Helpful resources

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 (2,382)