cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
moosebot88
Helper III
Helper III

Highlight in gallery if time stamp is overdue

Hi,

 

I am new to powerapps, I am trying to update the gallery if the timestamp is over an hour old

 

The field I have displayed is statusupdated

 

I currently have this on my colour property but not sure how to format the over 60mins from now?

If(statusupdate<=Now()-60,RGBA(0, 0, 0, 1),RGBA(184, 0, 0, 1))

 

I want to make it bold so I presume i would do something similar but instead do it on the FontWeight Property

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @moosebot88 ,

Not sure the colours are the right way around, but this is the syntax

If(
   DateDiff(
      Now(),
      statusupdate,
      Minutes
   ) <60,
   RGBA(0, 0, 0, 1),
   RGBA(184, 0, 0, 1)
)

the FontWeight

If(
   Self.Color = RGBA(184,0,0,1),
   FontWeight.Bold,
   FontWeight.Normal
)

 

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

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @moosebot88 ,

Not sure the colours are the right way around, but this is the syntax

If(
   DateDiff(
      Now(),
      statusupdate,
      Minutes
   ) <60,
   RGBA(0, 0, 0, 1),
   RGBA(184, 0, 0, 1)
)

the FontWeight

If(
   Self.Color = RGBA(184,0,0,1),
   FontWeight.Bold,
   FontWeight.Normal
)

 

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

I forgot to mention that my field is formatted in the dd/mm/yyyy hh:mm format?

@moosebot88 ,

Still should work - I am testing that the date and time are less than 60 minutes in the future.

moosebot88
Helper III
Helper III

No it was me my field was called statusupdated and also needed to be anything older than an hour. Thanks for your help

Actually this still isn't working, I slightly changed the formuala as it was giving me an error and I thought this was working.

 

The line statusupdated, wouldn't work but ThisItem.statusupdated does?

 

It should be highlighting if the time is over 60 minutes in the past with red text.

 

If(
   DateDiff(
      Now(),
      statusupdate,
      Minutes
   ) <60,
   RGBA(0, 0, 0, 1),
   RGBA(184, 0, 0, 1)
)

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,184)