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 / Make an icon visible i...
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!

Categories:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    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

  • DJ_Jamba Profile Picture
    2,837 Super User 2025 Season 2 on at

    Put this in the visible property

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

     

  • MHSPDev Profile Picture
    65 on at

    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,837 Super User 2025 Season 2 on at

    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.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard