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:
  • WarrenBelz Profile Picture
    156,956 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
    156,956 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
    156,956 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

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard