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 / The right side of the ...
Power Apps
Answered

The right side of the equal needs to be a constant value?

(1) ShareShare
ReportReport
Posted on by 482

Dear all

 

I have a CDS table with a LookUp to the Users table.

 

In a gallery, I would like to get a field from the Users table with LookUp(), but with the following formula I get the error message in the subject/below. Does anyone know why? I've used LookUp a million times before (although not with CDS), and I never run into this before.

LookUp(Users, User = ThisItem.'Created By'.User).'Full Name'

Error:

error-users.png

 

Cheers

 

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @mrQ ,

    I am a SharePoint user, but this may work for you - assuming User in your Users table is a single line of text

    LookUp(
     Users, 
     User = ThisItem.'Created By'.DisplayName
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • mrQ Profile Picture
    482 on at

    Hi @WarrenBelz 

    I'm also a SharePoint user and recently tried my luck with CDS/Dataverse, but I find it strange in many ways. 

     

    In CDS, you have a default Users table. I realized the table is being filled automatically with all users in the tenant, including a column called User that is the unique identifier for a particular user in that table. All this is managed automatically by M365. 

    I have also added a custom column to the Users table - Billable Rate (I know, in my initial post I mentioned 'Full Name', but I didn't wanted to confuse you guys, cause getting a certain value from that table works the same way, whether it is 'Full Name' or 'Billable Rate').

     

    In the mentioned gallery from my initial post, for the Items property, I'm using a custom-table from CDS (let's call it 'Time Tracking' ). Now, for some reason I get the error message when I'm trying to get the 'Billable Rate'. However, even though I'm getting the error message, it still shows up correctly in the gallery.

  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @mrQ ,

    What exactly are you trying to compare in this table to get the output? I assumed you were after a match on the user that created the record.

  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @mrQ 

    I've seen errors of this nature before, often when I call look up from within a ForAll.

    I've put this down to a bug, or a glitch in the designer.

    In most cases, I find that I can remove the error by reversing the values in the condition (which I guess is what error message alludes to).

    For example, here's where I've recreated the error by adding the condition "ThisItem.'Created By'.User = User"

    timl_0-1609159466538.png

    Yet if If I change this to "User = ThisItem.'Created By'.User", the error goes away.

    timl_1-1609159580505.png

     

    Another tip I would add is that with CDS/Dataverse, it's possible to retrieve user details without calling LookUp. In your gallery control, you can just use this syntax:

    ThisItem.'Created By'.'Full Name'

     

  • Verified answer
    FabianAckeret Profile Picture
    975 on at

    Hi @mrQ 
    In addition to @timl 's response:

     

    I also often encountered it in a ForAll loop. While I didn't know that you could simply switch the conditions, I used As as a workaround.

    For example:

    ForAll(
     <datasource> As MyCustomName,
     LookUp(Users, User = MyCustomName.'Created By'.User).'Full Name'
    )

     

    Instead of ThisRecord, you'd simply use MyCustomName

     

    I hope this helps.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard