Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Make an icon visible if the following criteria matches

(0) ShareShare
ReportReport
Posted on by 65

Hi all,

 

Currently facing an issue with an update to an app I'm trying to make.

 

I have a desk booking app that we are currently updating to have a live map of the office and desks.

 

I've added 46 icons next to each desk that will only become visible if someone that is a first aider has selected to book that desk on todays date.

 

For example, for Desk 46 the criteria that the formula looks for is if the DeskText field contains Desk 46, the First Aider choice field = Yes and the BookingDate is todays date, if so it should make the icon visible:

 

 

Visible = If(LookUp(DeskBookings, DeskText = "Desk 46" && FirstAider.Value = "Yes" && BookingDate = Today(), true)

 

 

This does not work and I can't figure out if it's the LookUp statement not being completed correctly, the If statement or just the entire thing is wrong.

 

Any help and explanation is appreciated.


Thanks all!

  • DJ_Jamba Profile Picture
    2,815 Super User 2025 Season 1 on at
    Re: Make an icon visible if the following criteria matches

    Sorry folks - I don't mean to offend anyone.

    Filter is terribly inefficient in this scenario.
    You could potentially have to filter many records and then count them.
    What if there are 300 records?

    A lookup only needs to find one case where it's true, doesn't have to count any records and is far more efficient.

  • MHSPDev Profile Picture
    65 on at
    Re: Make an icon visible if the following criteria matches

    Thanks mmbr1606, if you don't mind can I ask:

     

    What's the purpose of "CountRows" and also what is the purpose of the "> 0" near the end of the formula.

  • DJ_Jamba Profile Picture
    2,815 Super User 2025 Season 1 on at
    Re: Make an icon visible if the following criteria matches

    Put this in the visible property

    !IsBlank(
     LookUp(
     DeskBookings,
     And(
     DeskText = "Desk 46",
     FirstAider.Value = "Yes",
     BookingDate = Today()
     ),
     DeskText
    )

     

  • Verified answer
    mmbr1606 Profile Picture
    12,104 Super User 2025 Season 1 on at
    Re: Make an icon visible if the following criteria matches

    hey @MHSPDev 

     

    can u please try this:

     

    If(
     CountRows(
     Filter(
     DeskBookings, 
     DeskText = "Desk 46" && 
     FirstAider.Value = true && 
     DateValue(Text(BookingDate, DateTimeFormat.ShortDate)) = Today()
     )
     ) > 0, 
     true, 
     false
    )
    

     

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard