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 / System resetting daily...
Power Apps
Unanswered

System resetting daily, weekly and monthly [afresh]

(0) ShareShare
ReportReport
Posted on by 361

Contextualizing: I have a system that changes the fill of an icon to green and yellow in 3 conditions, daily, weekly and monthly. This condition applies from records saved in a list, which are answered in a form, which some of these records are monthly, daily and weekly...

Problem: The daily subtracts the label9 (date the records were released), turning green while it counts 24 hours to turn yellow, the weekly counts 168 hours to turn yellow, and the monthly counts 720 hours to turn yellow.

and I need to make a change in this system, for it from the saved record and taken in label9, instead of counting 24, 168 and 720 hours from the saved record, leaving the yellow fill on the same date!

Joaoandrebs_0-1688388050442.png

 

Ex:
Diary turns yellow 8:00 A.M every day
Weekly turn yellow every Monday at 8:00
Monthly turn yellow every 1st of every month

I believe I have only one detail to modify, but I haven't found a way yet

 

my code:

Switch(

ThisItem.Frequencia;

"Diario";

If(DateDiff(DateTimeValue(Label9.Text);Now(); TimeUnit.Hours) < 24; Color.Green;Color.Orange);

"Semanal"; 

If(DateDiff(DateTimeValue(Label9.Text);Now(); TimeUnit.Hours) < 168; Color.Green;Color.Orange);

"Mensal"; 

If(DateDiff(DateTimeValue(Label9.Text);Now(); TimeUnit.Hours) < 720; Color.Green;Color.Orange)

)

Diario = Daily

Semanal = Weekly

Mensal = Monthly

ThisItem.Frequencia = frequency (monthly, daily, weekly)

Categories:
I have the same question (0)

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard