Hello community,
I'm working on an app where I'm working to calculate the break time duration of an employee. When I test my app on power apps it gives me the right value, but when I test my apps on teams it gives me the wrong value.
the formula expression which I am using to patch my break duration is:
Patch(SPlist,Defaults(SPlist){
BreakDuration : DateDiff(
DateTimeValue(
Bintime.Text,
"fr-FR"
),
Now(),
Minutes
)
})
Bintime is my label where im displaying my break start time and im using this in my formula too.
Check here if it helps
If you don't have a server side solution, and need a simpler solution, check if you can do this below instead:
Set(varCurrentTime, Now());
DateDiff(
DateTimeValue(
Bintime.Text,
"fr-FR"
),
varCurrentTime,
Minutes
)
It's possible Power Apps is caching the Now() and calculating it only once - and maybe more so in Dataverse for Teams - and perhaps an explicit Set to a variable forces it to update, for some reason.
Does the above help?
Hello @poweractivate ,
thanks for your reply but still i am facing the same issue.
some users have the right value in their column, and also when im getting right value through power apps but not from teams.
User | Count |
---|---|
258 | |
108 | |
93 | |
57 | |
40 |