Notifications
Announcements
I have a connected table Named Current_Session. I have a Text Label on my canvas app where i want the text to = Lookup(Current_Session, SessionRef = 1).SessionName. This returns Blank. What am I possibly doing wrong?
Table Name = Current_Session
SessionName
It's because the LookUp Returns a Table even if it just contains 1 row. For you to retrieve that row and use its property Session name, Use the First command. Below should do it.
First(Lookup(Current_Session, SessionRef = 1)).SessionName
@cha_cha
You are wrong. LookUp() returns the first record in a table that matches the criteria. You are thinking of Filter() which returns a table. Your formula should work or you can try Lookup(Current_Session, SessionRef = 1, SessionName)
so my first issue seems to be SessionRef = 1, it gives me an error saying "Incompatible types for comparison. These types can't be compared: Text, Number.", However SessionRef is the column name in the data table and 1 is the first value in that column. do i need reference the column name within the formula differently?
@RCWh3rry
The problem is that your table considers SessiionRef to be text. Try Lookup(Current_Session, Value(SessionRef) = 1).SessionName
Value() changes SessionRef to a number so it can be compared.
@Drrickryp Thanks for pointing that out. I'm very dependent on PowerApps suggestions and auto complete.
That does fix the error in the formula, however it still returns the formula = Blank. I'm lost as to why it will not return the value in the SessionName column?
To troubleshoot this, put a datatable on your screen and set it's DataSource to Current_Session and see what values you get in the SessionName column. Please specify the type of datasource you are using and the type of column SessionName is.
so the data source is an excel spreadsheet added through OneDrive. I added the data table to the screen, added the filed SessionRef (which says its a text field), but it says there is no data to display.
Excel is a terrible data source and I suspect that it has become corrupted in some way. Once a table has been imported, any changes to the schema in Excel will corrupt the table.
Delete the current table from Powerapps. Go back to Excel and copy the data to a new table without the last column (the one added PowerApps). Set the column types to either Text or Number, make sure there is a value in the first row below every column header even if you have to sort the table and re-import the data back into PowerApps. Consider moving the data to SharePoint and watch Shane Young's video https://www.reddit.com/r/PowerApps/comments/l5n0q1/video_learn_why_excel_is_a_terrible_data_source/
I removed the table in the excel sheet and re-added it. I also removed the data source from the power app and re-added it through excel online instead of through Onedrive. this fixed the issue and it works now. Thank you!
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268