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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApp LookUp doesn'...
Power Apps
Unanswered

PowerApp LookUp doesn't seem to work for Column Names with spaces in Excel(One Drive Business)

(0) ShareShare
ReportReport
Posted on by 4
Hi All,
 
I'm trying to populate the Item Property of an Edit Form Control via LookUp but I can't seem to make it work.
Here's my code:
   LookUp(Customers, 'Customer ID' = "123")
 
But this code results in a Runtime Error:
"Error when trying to retrieve data from the network: Syntax error at position 11 in 'Customer ID eq '123''.      
inner exception: Syntax error at position 11 in 'Customer ID eq '123''. clientRequestId: 03a87ad6-4aec-4246-9921-e675d787a79d"
 
 
I also tried replacing the spaces with x0020 as noted in the LookUp function guidelines,
   LookUp(Customers, "Customer_x0020_ID" = "123")
 
This didn't show any error but it also doesn't return any data from the Excel file even though there's a record for 123 Column ID. 
 
Note: I already know that using spaces in Column names isn't advisable but I would like to make this work in case I encountered
an already existing data source that has this specific flaw.
 
 
Kindly help me with this. Thank you.
Categories:
I have the same question (0)
  • JasonZF Profile Picture
    572 on at

    Is the Customer ID column a text column or number column? If it's a number column, you must omit the quotation marks so it looks like this:

    LookUp(Customers, "Customer_x0020_ID" = 123)

    If it's a text column, then I'm afraid I'm not sure.

     

  • tropicsky Profile Picture
    4 on at

    Hi Jason,  

    It's a text column, but I also tried removing the quotation marks and it states that "Incompatible types for comparison. These types can't be compared: Text, Number"

    Could you please try replicating the issue? Maybe it will work on your machine.
    It would give me hope if LookUp works on your side.

  • tropicsky Profile Picture
    4 on at

    After trying again and again, I found a way to make this work.

    If you're using an excel file, the Data connector should be OneDrive for Business instead of Excel Online(Business).
    DataSource from the OneDrive doesn't throw a syntax error when using the 'Costumer ID' while when the Powerapp is connected to Excel Online, the error keeps on appearing.

     

    I don't know why this issue occurs. I thought that both Data Connectors will work since they both support Excel files.

    After learning this now, I would like to ask if it's possible to change the title of my post since it is misleading,
    it should be "PowerApp LookUp doesn't seem to work for Column Names with spaces in Excel Online(Business)" ?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard