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 / When combobox is empty...
Power Apps
Answered

When combobox is empty set lookup labels to empty

(0) ShareShare
ReportReport
Posted on by 1,512 Microsoft Employee

I have a screen that has a Combobox that looks up different people in AD

Dorinda_0-1668463817251.png

When nothing is selected I do not want anything showing up in the three labels below the combobox which are lookups

Upper(LookUp(mapPins,cmb_Employee.Selected.DisplayName='Current Occupant'.DisplayName).Building)

How can I clear out that information if the Combobox is empty?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Dorinda 

    It's already going to be blank!  If there is nothing selected in the combobox, then the Lookup is going to return nothing...and thus the label will be blank.

     

    Are you seeing something different?

  • Dorinda Profile Picture
    1,512 Microsoft Employee on at

    @RandyHayes  but as you can see there is data in those labels in orange so it is not clearing.

     

    Dorinda_0-1668465095180.png

     

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

    @Dorinda 

    I see that there is something there...but there should not be!  Scrutinize your formula by placing your cursor at various points in it to determine where it is getting a value.

     

    First, switch your formula to be more correct to:

    Upper(LookUp(mapPins,'Current Occupant'.DisplayName = cmb_Employee.Selected.DisplayName, Building)

     

    Then, for example, highlight the part in red below in your formula editor...the editor should tell you that it is blank if there is in fact nothing selected.

     

    Upper(LookUp(mapPins,'Current Occupant'.DisplayName = cmb_Employee.Selected.DisplayName, Building)

  • Dorinda Profile Picture
    1,512 Microsoft Employee on at

    I havent selected anything yet something is still being selected 

    Dorinda_0-1668466220048.png

     

  • Verified answer
    Dorinda Profile Picture
    1,512 Microsoft Employee on at

    Ok I have it working now with a bit of a difference then what you sent @RandyHayes

    If(supervisor,Upper(LookUp(mapPins,cmb_Employee.Selected.DisplayName='Current Occupant'.DisplayName).Building),Blank())
    
    

     Created a variable onVisible of the screen

    UpdateContext({
    enabled: false,
    visible: false,
    supervisor: false
    })

     

    Everything works as expected.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 392

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 271 Super User 2026 Season 1

Last 30 days Overall leaderboard