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 / lookup error for datab...
Power Apps
Answered

lookup error for database data source

(0) ShareShare
ReportReport
Posted on by 24

hello,

 

when I try to use lookup function for database data source It's work, but I getting the following formula error:

The requested operation is invalid. Server Reponse: TableName failed: Expression expected at position 34 in ColumnName eq '. inner exception: Expression exception: Expression expected at position 34 in Column name eq '. clientRequestId: 571ab9b3-d6e4-48fc-997b-c6c3c6b3561b

 

lookup formula that I am using at gallery item level as text in label:

LookUp(TableName, ColumnName = ThisItem.ColumnName).SomeOtherColumnName

 

do you have any idea what could be a reason for such a error?

 

Best Regards

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,447 Most Valuable Professional on at

    Hi @jacob_ ,

    What type of fields are ColumnName and OtherColumnName?

  • jacob_ Profile Picture
    24 on at

    well at the datasource level ColumnName data type is int, but OtherColumnName is varchar(3000)

  • WarrenBelz Profile Picture
    154,447 Most Valuable Professional on at

    @jacob_ ,

    What is your data source (SQL)?

  • jacob_ Profile Picture
    24 on at

    azure sql (serverless), moreover  ThisItem.ColumnName (whole number) is passed from Power BI

  • WarrenBelz Profile Picture
    154,447 Most Valuable Professional on at

    @jacob_ ,

    I will tag colleague @RandyHayes here - I do not use SQL

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jacob_ 

    From the error message, it appears that ThisItem.ColumnName has no value.

    What is the context of your Lookup - form, gallery, etc?

  • jacob_ Profile Picture
    24 on at

    that's correct first record of gallery do not have value for this attribute, what is the best practice to handle such a records via lookup function? 

     

    thank you!!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jacob_ 

    You might consider a conditional statement such as:

    If(!IsBlank(ThisItem.ColumnName), 
     LookUp(TableName, ColumnName = ThisItem.ColumnName, SomeOtherColumnName)
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard