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 / Changing Icon Color
Power Apps
Answered

Changing Icon Color

(0) ShareShare
ReportReport
Posted on by 269

Hello just wanted to seek some help from you guys on how can I change the Icon Color based if they are Log In or Log Out
1.PNG

I filter the gallery based on the persons who reports to  me which is this person is Reporting to me.

And I add the icon to identify if this person is Log In or Log Out based on it's color.

But the Log In and Log Out Status is on different SP List.

 

Thank you!

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Hi @Marlin-A ,

    Icons have a Color property which you can set conditionally, so on this property

    If(
     WhateverYourCondition,
     Green,
     Blue
    )

    or whatever colors you need - happy to help with the syntax further if required.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Marlin-A Profile Picture
    269 on at

    Hello sir @WarrenBelz ,

     

    Yeah okay,
    But the items on that Gallery is based on Members SP List which where I filtered based on who is reporting on me.

    Filter(Members,Reports_To=varUserID)

    and the source to Identify if the Member is Logged In or Logged Out is on Tracker SP List.

    If(ThisItem.Status.Value="Log In",RGBA(50 , 205 , 50, 1),
    ThisItem.Status.Value="Log Out",RGBA(213, 0, 0, 1),
    ThisItem.Status.Value="Going On Break",RGBA(255 ,165 , 0, 1),
    ThisItem.Status.Value="Coming Back From Break",RGBA(50 , 205 , 50, 1))

    The Status column is located on the Tracker SP List.

     

    Thank you!

     

  • Verified answer
    WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Ok @Marlin-A ,

    Without being able to completely visualize this, my first thought would be as long as you have a matching field to the Tracker list in your gallery, this should be simple. So for instance if you had a field UserID in both places (change to your references), the Color (as per your post) would be something like

    With(
     {
     vStatus:
     Lookup(
     Tracker,
     UserID = ThisItem.UserID,
     Status.Value
     )
     },
     Switch(
     vStatus,
     "Log In",RGBA(50 , 205 , 50, 1),
     "Log Out",RGBA(213, 0, 0, 1),
     "Going On Break",RGBA(255 ,165 , 0, 1),
     "Coming Back From Break",RGBA(50 , 205 , 50, 1)
     )
    )

    Happy to elaborate further.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Marlin-A Profile Picture
    269 on at

    Hello sir @WarrenBelz ,

     

    Sorry I don't understand,

    This is the column for the Members SP List.

    1.PNG

    and this the columns for the Tracker SP List

    error.png

    This is OnStart property on my App.

    Set(
     varUserEmail,
     User().Email
    );
    Set(
     varUserID,
     LookUp(
     Members,
     Member_Email = varUserEmail,
     ID
     )
    );

     

    Thank you!

  • Verified answer
    WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Thanks @Marlin-A ,

    The varUserMail is your email if you are logged in on this app.

    I am assuming if the other users logs in, they update their status in the Tracker List?

    You are wanting a status of all members as per the Tracker list in the gallery formed by the Members list and it appears that Member_Email is the linking value between the lists? If so, the icon Colour in the gallery should be

    With(
     {
     vStatus:
     Lookup(
     Tracker,
     Member_Email = ThisItem.Member_Email,
     Status.Value
     )
     },
     Switch(
     vStatus,
     "Log In",RGBA(50 , 205 , 50, 1),
     "Log Out",RGBA(213, 0, 0, 1),
     "Going On Break",RGBA(255 ,165 , 0, 1),
     "Coming Back From Break",RGBA(50 , 205 , 50, 1)
     )
    )

    or have I missed something in the logic above?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Marlin-A Profile Picture
    269 on at

    Hello @WarrenBelz ,

     

    Yeah it changes the color the now to Green,
    error.png

    but I already logged out 

    1.PNG

     

    How can I get the latest entry of the member so I could monitor them?

     

    Thank you!

  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Hi @Marlin-A ,

    You have not given me your date field name - change to yours in the below. Also I assume the gallery is selected off the other gallery item.

    First(
     Sort(
     Filter(
     Tracker,
     Member_Email = YourGalleryName.Selected.Member_Email
     ),
     YourDateTimeFieldName,
     Descending
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Marlin-A Profile Picture
    269 on at

    Hello sir @WarrenBelz ,

     

    Where should I put that code?

    1.PNG

    BTW this screenshot provided is on different app.

     

    What I am trying to build is that I want an App that will show all the members who is reporting to me, and see if they were logged in or logged out.

     

    Thank you!

     

  • WarrenBelz Profile Picture
    155,632 Most Valuable Professional on at

    Ok @Marlin-A ,

    This is getting way beyond the original post question and needs to be filed separately.

    Can you please accept this one and post the details of the other app, tag me and I will pick it up.

    I will need to get my mind around what you have done there.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard