What I want to do
End result should be two times formatted as hh:mm:
• Processing Time (time an edit form was actively being worked on)
• Hold Time (all the other time)
Current Set Up/Exposition
I have been wracking my brain over this for two months. I feel like the answer is going to be right in front of my face. I have tried many things periodically as I've been building this app, but this is where I'm at currently. I have a PowerApp that is now fully functional, but still doesn't calculate these times. This app uses data from a single SharePoint list used to track cases. I have a 'Status' column which reflects Active, Hold, or Completed. This status is changed using a button once in the form which toggles the global variable 'var_Hold' (true=Status:Hold, false=Status:Active). I also have a start time saved to the item's 'Start Time' column upon case creation (stores Now() in a variable on visible, Start Time data card value=If(IsBlank(ThisItem.'Start Time'),var_StartTime,ThisItem.'Start Time')), and an end time saved to the item's 'End Time' column upon closing the case (tied to an automation which also sets status to Completed). I have a 'Total Time' calculated column which gives the time between Start and End. Finally, 'Processing Time' and 'Hold Time' columns which will hopefully eventually reflect the correct data.
What I've tried
• Two timers: one that runs when var_Hold=true, and one that runs when var_Hold=false.
- Couldn't figure out how to keep this going when the app was closed
- Couldn't figure out how to reliably hold on to existing time values per case
• One timer that is active when either var_Hold=false or ThisItem.Status="Active"
- Same as previous
- Couldn't figure out how to keep a running total
• Latest attempt: Using one timer that auto starts when the case is active and adds its time to another control (currently using text input, it will be invisible to processors). Hold time column is [Total Time]-[Processing Time].
- Can't get timer to reliably pay attention to anything (var_Hold or Status)
- Can't figure out the best way to format these controls (timer and text input) so they play nice with each other (recognizing hh:mm:ss)
- Once that is done, can't figure out how to communicate correctly with SP as [Start Time] and [End Time] are Date/Time fields, and [Total Time] is a single line text field (example of current formatting: 174:03).
tl;dr
I need hours an item was being worked on, and the hours it was not. It is definitely possible I borked something in my previous attempts. Please help!

Report
All responses (
Answers (