Hi
I'm trying to create the following.
- Timer starts when pressed.
- Timer Ends, roundup to minutes always and patch SharePoint column (Column named "TimeSpent").
- If timer starts again later on the same item I will take the current minutes saved in the column "TimeSpent" and add the new minutes and then patch.
Now first issue is a normal timer looks like it stops the time if you minimize the window. This was solved as following.
- StartButton
Set(StartTime, Now());
UpdateContext({StartTimer:true})
- Timer
OnTimerStart:
Set(Now, Now())
-TimerLabel Showing Time
Text(Time(0, 0, DateDiff(StartTime,Now,Seconds)), "[$-en-US]hh:mm:ss")
The above will keep the time running even if you minimize the window and do something else.
Now what I want is to take the data from the TimerLabel and RoundUp to only minutes. (This is what i have issue with, dont know how to do this correctly)
Last step is to patch the SharePoint column with the minutes. This part is half done as i can patch the column but i cannot get only minutes and my other issue is if the item already have data in the column, for example the item has 55minutes stored, then i want to take the 55 and add the new minutes i just collected and patch it.