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 / Change the color of a ...
Power Apps
Answered

Change the color of a rectangle when the sharepoint list meets certain criteria.

(0) ShareShare
ReportReport
Posted on by 74

Hello all,

I have a rectangle that should change color when, for example, an item in my sharepoint list has "Number =1" and "Title=Hello". If both criteria exist, the rectangle should turn green, if not red.

Can someone help me with this?

Categories:
I have the same question (0)
  • MSM_Scoozi Profile Picture
    63 on at

    If(Lookup(Table_Name, ItemID).Number = 1 And Lookup(Table_Name, ItemID).Title = "Hello", Green, Red)

     

    Not sure exactly how your set up is looking but try this and see if you can get it to work. Should be live just make sure you call the Refresh(Table_Name) after or you wont have the updated value.

  • benediktwnr Profile Picture
    74 on at

    I don't know what I'm doing wrong here.Capture.PNG

  • Verified answer
    MSM_Scoozi Profile Picture
    63 on at

    so the 2nd parameter of the Lookup function needs to return an object or a list item. to make this happen you need to say Lookup(testCalender, number = something).Number. Right now as it is written there is no object being returned to take the .Number value of. Generally I will use the ID of the item to find it using the lookup function.

     

    Hope this helps!

  • benediktwnr Profile Picture
    74 on at

    I don't know, it doesn't quite work the way I want it to.
    Maybe I'll explain the meaning behind it, that might make it easier.
    It should be later a table plan, in which you can see when which room is occupied. In my list I have then a date and the table number. So I ask if there is no element with e.g. the table number 21 and the date 10/21/2022, if there is not, the rectangle should be green, if there is, it should be red.

  • benediktwnr Profile Picture
    74 on at

    benediktwnr_0-1666250570213.png

     

  • Verified answer
    benediktwnr Profile Picture
    74 on at

    Here is my solution:

    If(LookUp(Bookings; deskID = "2").deskID = "2" And LookUp(Bookings; date = _dateSelected).date = _dateSelected; Green; Red)

    The errors were because the syntax is different in Germany. Thanks a lot!

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard