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

When combobox is empty set lookup labels to empty

(0) ShareShare
ReportReport
Posted on by 1,512

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,297 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 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,297 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 on at

    I havent selected anything yet something is still being selected 

    Dorinda_0-1668466220048.png

     

  • Verified answer
    Dorinda Profile Picture
    1,512 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

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