cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Icon Color

Hello,

 

I am building a managers view for attendance, 

I have already an app which will record if the members is logged in or logged out

error.png

and this is the Columns for this 

1.PNG

 

And I am building this Manager's View App
Eyes.png

I already filtered this gallery based on the members who is reporting to me.

The source on this gallery is this.

Logs.PNG


What I want now is to change the Icon Color based on the status on the Tracker. 

In the Screenshot provided the Icon Color is Green because It already captured the old entry on the list.

* Looking on the first screenshot I already logged out which means the icon should be now red, but still captured the old one.

Mentioning sir @WarrenBelz on this. 
Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Icon Color

Hello @Marlin-A 
Add a column Status to your Members list. On the Log On button

If(
   IsBlank(
      Lookup(
         Members,
         Member_Email = ThisItem.Member_Email,
         Member_Email           //there is no item present
      )
   ),
   Patch(
      Members,
      Defaults(Members),
      {
         User_Email:User().Email,
         Status:"Logged On"
      }
   ),
   UpdateIf(
      Members,
      Member_Email = ThisItem.Member_Email,
      {"Status: "Logged On"}
   )
)

On the Log Off button - the member will already be there

UpdateIf(
   Members,
   Member_Email = ThisItem.Member_Email,
   {"Status: "Logged Off"}
)

 

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.

 

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Icon Color

Hi @Marlin-A ,

From the previous post, you wanted to show the latest item for the user, this seems to be a different question again.

I thought we had solved the icon colour question - can you please elaborate on exactly what extra items you want to solve.

Highlighted
Super User
Super User

Re: Icon Color

Ok @Marlin-A ,

You want one item only from the user (the latest) and you want the icon to change colour depending on what the status is and you have a list called Tracker which contains all logging information but you need one record from EACH user.

I had a go at this, but it is way too complex - you would have to cycle through the entire Tracker list in descending order and then on each item check if it was already in the list.

Can I please make another suggestion that would work perfectly. Have a list of users and a Status and simply Patch to this when a button was pushed. You could automatically add new users to the list if the user was not already there by doing a lookup and having a new item rather than an update.

 

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.

 

 

Highlighted
Helper IV
Helper IV

Re: Icon Color

Hello @WarrenBelz ,

 

Thank you, What I am struggling to do right now is to make a column on my members list and then If I push the button it will also update real time on the Members list. So it is easy to called the status value.

Patch(
    WFH_Tracker,
    Defaults(WFH_Tracker),
    {
        Member_Name:DataCardValue2.Text,
        Member_Email:DataCardValue1.Text,
        Status:DataCardValue3.Selected,
        Submission_Date:Now()
    }
);

I have this patch syntax on my submit button, figuring out how can I update the specific column record on Members SP list based on the Member_Email

 

Thank you!

Highlighted
Super User
Super User

Re: Icon Color

Hello @Marlin-A 
Add a column Status to your Members list. On the Log On button

If(
   IsBlank(
      Lookup(
         Members,
         Member_Email = ThisItem.Member_Email,
         Member_Email           //there is no item present
      )
   ),
   Patch(
      Members,
      Defaults(Members),
      {
         User_Email:User().Email,
         Status:"Logged On"
      }
   ),
   UpdateIf(
      Members,
      Member_Email = ThisItem.Member_Email,
      {"Status: "Logged On"}
   )
)

On the Log Off button - the member will already be there

UpdateIf(
   Members,
   Member_Email = ThisItem.Member_Email,
   {"Status: "Logged Off"}
)

 

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.

 

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,911)