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 / Text Label not updatin...
Power Apps
Answered

Text Label not updating based on a Lookup value from a value in a Dropdown list

(2) ShareShare
ReportReport
Posted on by 49
Hi Everyone,
 
Please reference the screenshot below - I have a Label that uses the Lookup code:
LookUp(APVEN, VENDNAME = VendorList.Selected.VENDNAME, VENDORID)
APVEN is the Excel Table in Sharepoint that is connected. VendorList is the Controlbox Name for the Dropdown list. VENDNAME is the field that the Dropdown list is pulling values from in the Excel table, and VENDORID is the value that I am trying to show in the label. For some reason it is just showing up Blank. Any ideas on what I could be doing wrong? The field names match the header values in the Excel file and I'm not getting any errors in the Power App screen.
 
Categories:
I have the same question (0)
  • Suggested answer
    cha_cha Profile Picture
    4,932 Moderator on at
    Hello,
     
    Can you try updating your code to this:
    LookUp(APVEN, VENDNAME = VendorList.Selected.VENDNAME).VENDORID
  • MM-07112006-0 Profile Picture
    49 on at
    Hi - I updated the code and its still blank.
  • Suggested answer
    cha_cha Profile Picture
    4,932 Moderator on at
    That's a quick reply. 
     
    Before you read below, can you please try re-adding the Excel Data source.
     
    Then head over this item and let's see what it's properties are.
     
     
    Do something like this:
     
    Screenshot that output.
     
     
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    Your initial LookUp seems correct.
    Try using the Monitor.
    Double check your Excel table definition and control names.
    Refresh the excel data connection. 
  • MM-07112006-0 Profile Picture
    49 on at
    I noticed that the data in the cells are picking up hidden "spaces". Would this be causing this issue?
     
    Even though the Dropdown list is pulling that data, and referencing the same data in the lookup, I wouldn't expect the spaces to be an issue, but who knows.
     
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    Shouldn't make a difference. did you use Monitor.
    I am assuming you don't by coincidence have any other table objects called APVEN.
    Try First(APVEN).VENDORID just to see if it finds a value, then try the lookup with an actual value.  
  • timl Profile Picture
    36,738 Super User 2026 Season 1 on at
    Hi  MM-07112006-0 
     
    If the cause of this is trailing spaces, you could try the following to trim the spaces. 
    LookUp(APVEN, Trim(VENDNAME) = Trim(VendorList.Selected.VENDNAME), VENDORID)
     
  • MM-07112006-0 Profile Picture
    49 on at
    Ok I tried both of those suggestions:
     
    When I enter First(APVEN).VENDORID it does indeed return the value from VENDORID from the Excel table.
     
    I also tried the TRIM function to trim the spaces, but that returns a blank value as it did before, so I don't think that is it.

    I also took a screenshot when highlighting the Supplier Name dropbox, clicking Items and expanding the APVEN dialogue box. I don't see the leading columns that are in the far left of the Excel table, not sure why or if this has anything to do with why it isn't working?

  • timl Profile Picture
    36,738 Super User 2026 Season 1 on at
    To diagnose this further, could you set the Text of the label that you're using to this? Can you confirm that this returns the name of the selected item in the dropdown box?
     
    VendorList.Selected.VENDNAME
     
    Next, can you try hardcoding the name in the call to lookup to see if that returns the correct value?
    LookUp(APVEN, VENDNAME = "Caret Consulting Inc.", VENDORID)
    

     
    If that returns blank, can you confirm that the condition does return a row by calling CountIf? This should hopefully return a value of 1 if there's a matching record.
    CountIf(APVEN, VENDNAME = "Caret Consulting Inc.")
    
     
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    I really don't know what else it could be. 
    What did monitor show?
    Are the fields, for these columns, in Excel all defined as text?
    Does the ID value in the Excel table look properly formed?
    How many columns are in the Excel table, does it have duplicated rows?
     
     

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 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard