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 / Timesheet APP Question
Power Apps
Unanswered

Timesheet APP Question

(0) ShareShare
ReportReport
Posted on by 14

I have built a timesheet app in PowerApps with SQL Server as the DB to use as lookup and record data from the mobile pront end used by our technicians.

In the app I have used various controls and status to ensure that only today roster can be used. This works very well for the regular day to day rostered time between 04:00 and 18:00. (for example I use a form lookup as: LookUp('[dbo].[PSTSheet]', EmployeeId_1 = Value(TextInput23.Text) && Tjobno = Value(TextInput22.Text) && Text(tdate,"[$-en-US]yyyy-mm-dd") = Text(tdate, "[$-en-US]yyyy-mm-dd")) This returns a status for me to test that the timesheet data has been entered today.

I now find that we are starting to roster some work from around 22:30 to 04:00, which now presents me with a different problem. The company wants this to be one time block however my app tests for today() for the start of the rostered time. The issue become relevant when they go to sign off at 04:00 and SQL SERVER finds no record for today in the table. (based upon the above LOOKUP)

Yes we could roster it in two blocks 22:30 to 23:59 and then 0:00 to 0:400, but technicians are not likely to stop work at 23:59 to finish one roster and start a new roster for the new day. So this is not a preferred option.

I still want to preserve the lookup to ensure that only roster entries within the last 24 hours are checked.

 

Any ideas or thoughts on how to overcome a roster across 2 days would be grateful.

 

Thanks Paul

Categories:
  • ZePowerDiver Profile Picture
    279 Most Valuable Professional on at

    Paul,

    have you considered working with the DateDiff function and base your evaluation on the minutes or hours units ?

    depending on your business rules, you may have to do a combination of evals, based on the current time of the day, but if in facts, the real constraint is "within the last 24 hours", then eval just the difference.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard