I have currently a sharepoint list, connected to powerapps, that has the following...
I am creating a flow that shows this list to the user when the employee is out of the office (In between the check-out time and Check-In time) however, I want the Check-out, Check-in, Location, and Notes fields to be clear when the Employee is IN the office (When the time passes the listed Check-In Time). Currently, my flow looks like this...
The first condition just takes the Out of Office column and makes it equal to Yes. If it is Equal to Yes, it updates the field which works when tested. The second condition I want to take the Check-in column and make it less than or equal to the current time. If it is, it updates the item list to clear the fields I listed above however when I test it, that condition comes up with errors. Any help?
@Nickb11 what have you tried in the condition field that's throwing the errors? ie show us your code / dynamic content.
I messed around with convert date a month or so ago and couldn't get it to work. I just use addHours(utcNow(),x) now, where 'x' is number of hours I'm off UTC time. Not sure if that helps?
Also, are you going to be runing this flow on a schedule? Seems it would need to run a fair bit (maybe 10-12 times/hr?) to pick and change data? I guess, instead of a Flow you could do this all via PowerApps - but only if your users were prepared to check themselves in when they returned to the office?
Hi @Nickb11 ,
Could you please share a full screenshot of the configuration your flow?
Could you please share more details about the error message in the Condition2?
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That is a good idea, I just decided to use flow because I thought it would be easier than making employees have to manually check themselves back in. This timesheet isn't used to record time however, it is used to show a live feed of who is currently checked in and who is not. I'll try that line of code you sent for the time. I saw a video on how to use the convert time feature to set utcnow as the current timezone you are in however I can't tell if it worked or not because I am having trouble with making a relationship with my check in time and the current time. The error keeps showing that I can't make a relationship between my check-in time to be less than or equal to the current time. Also, yes you are right! My flow is going to have a schedule of refreshing every 5-10 minutes. I'm not sure if this might cause problems down the line because I have never personally used flow and don't know if it is reliable to trust a refresh that frequently.
That error appears to be saying you have a BLANK 'Check-in Time' field - which equals Null - and trying to compare that to a date string. Your Flow checks your entire SP List everytime it runs. I can think of two ways to get around this:
1. In your 'Get Items':
'Show advanced options' --> in the Filter field try --> 'Out of Office' eq Yes
** note: I (and many newbie Flow-ers) find it difficult to write these Filter queries so have a play around with it, this may not be the exact code to use but you get the idea. What I'm trying to do is remove items where Check-in Time is BLANK (because you are clearing these out when a person returns to the office).
2. If the above fails, then after your 'Get items', add a Condition like 'Check-in Time' is not equal to Null (add this via the Expression window, search for null). Then the rest of your Flow follows on the Yes side of this condition.
Thanks for the feedback, unfortuantly I got errors both times saying "Bad Request" when I added a filter field of 'Out of Office' eq Yes. I tried the second way as well and I got errors this time on the Update Items action in the yes column saying "Bad Request" as well.
@Nickb11 you need to apply that condition (Option 2) before your 1st condition ie right at the start of your 'Apply to Each', if that makes sense. You appear to have it further down in your Flow so it's still checking Null vs String.
Flow should be: Recurrance --> Get Items --> Convert Time --> Condition [ check if Check-in Time is Null] --> rest of your flow
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!