Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8IGYPEM+uwwnrwVtW8MvmP
Power Apps - Building Power Apps
Answered

Change icon color

Like (0) ShareShare
ReportReport
Posted on 4 Jun 2022 14:42:17 by

Hi @StalinPonnusamy 

 

For Waypoint icon, I want to change the icon color from red to green as available desk when user check out a desk.

Could you please help to edit the code?

 

If(ThisItem.IsSelected,RGBA(255, 191, 0, 1),With({_item:colOfficeBookingForThisDate},If(!IsBlank(LookUp(_item,Office.Id=ThisItem.ID&&Employee.Email=UserInfo.Email)),RGBA(255, 255, 0, 1),IsBlank(LookUp(_item,Office.Id=ThisItem.ID)),RGBA(54, 176, 75, 1),RGBA(255, 0, 0, 1))))

 

Thank you very much.

Categories:
  • Verified answer
    jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on 04 Jun 2022 at 16:39:09
    Re: Change icon color

    Pacthing a Yes/No depends on you datasource and on the context:

     

    Patching a sharepoint a record in a gallery: Patch ( Desks, Gallery.Selected, { 'Available': true } )

     

    Patching a dateverse a record in a gallery: Patch( Desks, Gallery.Selected, { Available: 'Available(Desks)'.Yes} )

     

     

  • kinghnvn Profile Picture
    on 04 Jun 2022 at 16:05:06
    Re: Change icon color
    Hi Daniel,
     
    CheckIn and CheckOut refer to the person using the desk, right? -> Yes, that’ right.

     

    What I would suggest is to Patch the column Available on the desk table (I am assuming you have a Desks table) whenever a user checks-in or out. -> Could you please show the code for reference?

     

    Many thanks.

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on 04 Jun 2022 at 15:57:13
    Re: Change icon color

    CheckIn and CheckOut refer to the person using the desk, right?

     

    On the other hand, Available is a property of the desk. What I would suggest is to Patch the column Available on the desk table (I am assuming you have a Desks table) whenever a user checks-in or out.

  • kinghnvn Profile Picture
    on 04 Jun 2022 at 15:50:28
    Re: Change icon color

    Yes, I have two columns CheckIn (Yes, No) and CheckOut (Yes, No).

    Could you please advice more details?

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on 04 Jun 2022 at 15:44:06
    Re: Change icon color

    Hi,

     

    You could consider having a Available Yes/No column. That column cloud be patched accordingly to show its status. Then the color manipulation would be really simple.

     

    Regards

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard