web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to obtain Name ...
Power Apps
Answered

Unable to obtain Name of LookedUp record

(0) ShareShare
ReportReport
Posted on by 189

I have a CDS entity named "Case Tickets" and it has a LookUp field named "Department".

I have a CDS entity named "Departments" and it has a Text field named "Name".

In the Case Tickets CDS entity, the Department LookUp field looks up from the Departments CDS entity.

 

In my Canvas app, I need to pull up a Case Ticket record and state its Department Name.

 

The following formulas aren't working 😞

LookUp('Case Tickets', name=varTicketToLoad).Department.Name

First(LookUp('Case Tickets', name=varTicketToLoad)).Department.Name

First(LookUp('Case Tickets', name=varTicketToLoad).Department).Name

Filter('Case Tickets', name=varTicketToLoad).Department.Name

First(Filter('Case Tickets', name=varTicketToLoad)).Department.Name

First(Filter('Case Tickets', name=varTicketToLoad).Department).Name

 

When I set them to a variable to check their output, they all have no value.

 

I have other LookUps as well and they all exhibit this same problem, e.g. Departments (CDS entity) has another field named "Address" and .Department.Address is no value too, and Case Tickets (CDS entity) has another LookUp field named "Requesting User" which looks up from Users (CDS entity) which has a field named "Full Name", and .'Requesting User'.'Full Name' is no value as well.

 

All my data sources have been added and refreshed, so I don't know what's wrong 😞

 

Any help will be appreciated! Please and thank you.

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Lexicron ,

    Do you mean that the LookUp formula could not return proper column value?

     

    Based on the issue that you mentioned, I have made a test on my side, please check the following screenshot:

    9.JPG

    Set the Text property of a Label to following:

    LookUp(TaskLists, 'Primary Name' = "Power Virtual Agent Authentication").'Normal Contact'.'Full Name'

    On your side, please consider type the following formula within the Text property of the Label:

    LookUp('Case Tickets', name = varTicketToLoad).Department.Name

    then check if the Label could return proper result value.

     

    On your side, please check if the LookUp formula could return proper record value. You could add a Label in your app, set the Text property to following:

    LookUp('Case Tickets', name = varTicketToLoad).'Unique Identifier Column'

    then check if the Label control could display proper GUID value. If it could not display proper GUID value, I think there is something wrong with your LookUp function. Please make sure the varTicketToLoad variable is populated with proper value. Also please make sure the Department field of this record has been populated with proper value from your "Departments" Entity

     

    In addition, please consider set the Text property of a Label to following:

    LookUp(
     Departments,
     'Unique Identifier Column' = LookUp('Case Tickets', name=varTicketToLoad).Department.'Unique Identifier Column',
     Name
    )

    Note: The 'Unique Identifier Column' represents the Unique Identifier type column in your Departments Entity. 

     

    Best regards,

  • Lexicon_ Profile Picture
    189 on at

    Hi @v-xida-msft 

     

    Thank you for responding!

     

    I have tried all 3 of your formulas:

    1. 

     

     

    LookUp('Case Tickets', name = varTicketToLoad).Department.Name

     

    The above did not return any result. There were no errors, but the label remained blank.

    2.  

     

    LookUp('Case Tickets', name = varTicketToLoad).'Unique Identifier Column'

     

    The above was successful, I was able to see "64017e26-f585-ea11-a811-000d3a6aaf70" in the label.

    3. 

     

    LookUp(
     Departments,
     'Unique Identifier Column' = LookUp('Case Tickets', name=varTicketToLoad).Department.'Unique Identifier Column',
     Name
    )

     

    This resulted in many errors.

     

    My formula was:

     

    LookUp(
     Departments,
     DepartmentID = LookUp('Case Tickets', Name="1234-Open-23/04/2020").Department.DepartmentID,
     Name
    )

     

    The errors I got were: 

    1. Invalid argument type (when I put my mouse cursor over the first '=' sign, in DepartmentID = LookUp)
    2. The function LookUp has some invalid arguments (when I put my mouse cursor over 'LookUp')
    3. The specified column is not accessible in this context (when I put my mouse cursor over 'Case Tickets')
    4. Invalid use of '.' (when I put my mouse cursor over '.Department')
    5. Invalid use of '.' (when I put my mouse cursor over '.DepartmentID')

    Also, when my mouse cursor is in 'Case Tickets', the bottom part of my formula bar shows this:

    Image 32.png

    There is no data available for Department and User (both are LookUp fields I am having the same trouble with).

     

    But in my Model-Driven App, all my records in 'Case Ticket' have User and Department assigned to them.

    Image 34.png

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Lexicron ,

    Based on the 'Case Tickets' Table screenshot that you mentioned, I found that the Department field and User field are not populated with proper value, actually, it is an known issue with the LookUp type column of CDS Entity in canvas app -- When retrieving data from CDS Entity, the LookUp type column would not be populated with proper value.

     

    If you save the CDS Entity records into a collection, the LookUp field would not be populated with proper value. Could please share more details about the error message in your LookUp formula?

     

    Please make sure the DepartmentID is the "Unique Identifier" Column in your Departments Entity. Please set the Text property of a Label to following:

    LookUp('Case Tickets', Name="1234-Open-23/04/2020").Department.DepartmentID

    check if the Label could display proper GUID value. I have made a test on my side, the LookUp formula could return proper value as below:

    1.JPG

     

    I have made a test on my side, and found that we could not use nested LookUp function inside a Filter function or LookUp function. As an fixed solution, you could consider add a Label control (Label1) in your app, set the Text property to following:

    LookUp('Case Tickets', Name="1234-Open-23/04/2020").Department.DepartmentID

    set the Visible property of the Label1 to false (hide the Label1).

     

    Add another Label (Label2), set the Text property to following:

    LookUp(
     Departments,
     DepartmentID = GUID(Label1.Text),
     Name
    )

    please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Lexicon_ Profile Picture
    189 on at

    Thanks @v-xida-msft.

     

     

    LookUp('Case Tickets', Name="1234-Open-23/04/2020").Department.DepartmentID

     

    Has no error but shows nothing. The label is empty.

     

    LookUp(
     Departments,
     DepartmentID = GUID(Label1.Text),
     Name
    )

     Same thing, no error but shows nothing.

     

    But it is good to know that we can't use nested LookUp!

     

    Could this be due to how I assigned the Department to the case tickets in my model-driven app? Did I do it wrong there? When I go to https://make.powerapps.com/ and open the entity in Excel (via "Edit data in Excel"), the Department GUIDs are filled in.

    Image 36.png

     

    On the contrary, things do show up when I use a Gallery. I added a Gallery and set Items to 'Case Tickets'. I added a label in my Gallery and set Text to ThisItem.Department.Name and ThisItem.User.'Full Name' and they show up correctly. ThisItem.Department.DepartmentID also shows the GUID correctly. 

     

    But when the label is outside a Gallery the same syntax doesn't show anything 😞

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Lexicron ,

    Based on the operation that you configured within your Entity, I could not find any issue with it.

     

    It seems that there is something wrong with the LookUp formula you provided in your app. Please consider modify it as below:

    LookUp('Case Tickets', "1234-Open-23/04/2020" in Name).Department.DepartmentID

    or

    First(Filter('Case Tickets', "1234-Open-23/04/2020" in Name)).Department.DepartmentID

    then check if the Label could show up proper GUID value.

     

    Also please consider remove the CDS Entity connection from your app, then re-create a new connection to your Entity from your canvas app, try above formula again, check if the issue is fixed.

    Note: Please check if you have typed proper Filter condition within your LookUp function

     

    Best regards, 

  • Verified answer
    Lexicon_ Profile Picture
    189 on at

    Hi @v-xida-msft,

     

    Removing and re-adding didn't work :(. I've also created a blank app from scratch and just added the Case Tickets and Departments entities and 1 label, but still the same blankness.

     

    Could it be a limitation of the Canvas platform? The Label control is unable to obtain LookUp data because the Label control does not support Items.

     

    I am going with the Gallery workaround. In my Gallery's Items property I put 

    First(Filter('Case Tickets', Name=varTicketToLoad))

    and I have a single Label1 in there with Text property 

    ThisItem.Department.Name

    and then my final Label2 with Text property

    Label1.Text

     

    I've then set my Gallery to Visible=No. This is working.

     

    Thank you so much for helping me with this!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard