Hello All:
I have a simple Approval flow that triggers upon recurrence every 3 days. It gets file properties and if file approval=pending it sends email to approver for approval. Our biggest challenge is that users are often in the files needing to be approved. Therefor when the the approver approves and the flow tries to update the file properties to 'Approve' it cannot do so because the file is locked for editing. The flow continues and errors but the approver is not aware of the fact that the file properties have not been updated. Then again on the third day they receive an email for approval of the same file because the properties are still=pending becuase the file was locked for editing and the metadata could not be updated on previous attempt. I have worked with this flow for months now and have tried just about everything. The only thing I have left is to try to add some kind of delay function into the flow to update the file properties at a specific time when the least amount of users are potentially in the file, say 2am.
I am open to options here. I have not been able to successfully implement a delay in such a way that would only update at 2am. The closest I have been able to get is to delay updating for a given amount of hours say 10 hours. This presents a problem as well as hours of business are roughly between 6am and 6pm. So even if an approver approves at 6am sharp the metadata would then be updated at 4pm, which still falls between our business hours thus potentially leaving the file locked for editing.
Any help or suggestions would be greatly appreciated.
Thanks all!
Tom
Solved! Go to Solution.
Hello @tomh ,
to delay until 2am the next day you can use the following expression inside 'Delay until' action.
addHours(utcNow('yyyy-MM-dd'),26,'yyyy-MM-ddTHH:mmZ')
utcNow('yyyy-MM-dd') will give you today's date at 00:00, to which you use the addHours() expression to add 26 hours to get tomorrow 2am and format it as 'yyyy-MM-ddTHH:mmZ' to fit the requirements of the 'Delay until' action.
@tomh ,
You could calculate how many hours are between utcNow() and 2am tomorrow and have the flow delay for that amount of time:
the flow in the below screenshot does the following:
1. Converts the current time in UTC (Universal Coordinated Time) to local timezone and returns only the Hours number (from a 24-hour format, so 1:00PM=13).
2. subtracts the current hour from 26 and returns that figure. 26 is the number of hours there are from 00:00 on day one to 0200 (2:00AM) the following day. this calculation determines how many hour there are from right now to 0200 tomorrow morning.
3. delays the flow for that many hours
the expressions that you need are in the action block comments in the screenshot.
I hope this helps!
thanks,
Kyle
Is there a reason that I am not understand that you cannot just use the delay until action?
Hello @tomh ,
to delay until 2am the next day you can use the following expression inside 'Delay until' action.
addHours(utcNow('yyyy-MM-dd'),26,'yyyy-MM-ddTHH:mmZ')
utcNow('yyyy-MM-dd') will give you today's date at 00:00, to which you use the addHours() expression to add 26 hours to get tomorrow 2am and format it as 'yyyy-MM-ddTHH:mmZ' to fit the requirements of the 'Delay until' action.
@Anonymous don't feel too bad about it. I came up with an elaborate solution also, which I think is quite neat! That is when I noticed delay until 😥
Thank you for this. Are you saying that utcNow always returns time of 00:00? So, adding any hours to that figure will always update at set time regardless of whether the approval occurs at 7am or 3pm?
Expression utcNow() without parameter returns date and time when the action was executed = now. But you if you add a format parameter where you ignore the time part utcNow('yyyy-MM-dd') it'll give you 00:00 time.
Does this look correct?
Yes, that looks just fine. 🙂
Hello.
The flow did not work as expected.
The flow was manually triggered at 1:09pm on 11/6 as a test on four files added to SharePoint. The flow proceeded to update the file properties at 9:00pm on the same day. The intended result was to update file properties at precisely 2:00am. The delay until input value shown on the successful run shows 'Delay Until 2020-11-07T02:00:002.
Any thoughts on why the flow updated the file properties at 9:00pm instead of at 2:00am?
Thanks!
Tom
@tomh ,
my first thought would be to check the TimeZone.
In your screenshot above, you're adding the number of hours required to get from utcNow() (when the flow was triggered) to 2:00AM UTC.
If you're in Eastern Time, that means the flow is going to wait until 9:00PM EST.
You can either manually adjust your expression to account for the timezone difference (note that this will not account for DST next spring), or you can use the Convert TimeZone action block and pass in your addHours() expression.
thanks,
Kyle
@Anonymous
Thank you for this. Yes we are on EST and want the flow to execute the 'Update File Properties' at precisely 2:00am the following day. Can you provide the formula for this by chance?
Thanks!
Tom
Hello @tomh ,
that could be a difference in a timezone. What account is running the flow? What timezone it has configured? I'm not sure but it could be user specific.
Edit: I just did a few tests and it expects time in UTC timezone, so you'll need to adjust the time as @Anonymous already suggested.
@tomh ,
I would suggest attempting one of the solutions that I suggested, and then request assistance if you're unable to get either (or both) to work.
You've been given the expression that will get you want you want, you just need to adjust it to meet your specific needs.
thanks,
Kyle
Hello @Anonymous
Maybe I'm misunderstanding what has been provided as the initial expression. I have control over when the flow is triggered but do not have control over when the approval is completed. The 'Update File Properties' action is the step that I believe I need to address here and that is dependent on when the actual approval is executed. I have no control over when the approval action is executed and so simply adding hours in the form of a delay will not achieve what I need if I apply it to when the approval is executed. I need a set value I believe irrelevant of when the approval is executed to update file properties at 2:00am EST only.
Does that make sense?
Or is it as simple as adding 6 hours to the 26 hour value to get to 2:00am?
@tomh ,
Yes, that does make sense; and I understand where you're coming from and that it seems counter-intuitive to be adding a set number of hours when you don't know WHEN the approval will be executed (i.e. you don't know the value of "utcNow()" [ remember that utcNow() returns the current time in UTC timezone] ).
what @tom_riha's solution does is help you calculate how many hours are between:
1. The time that the flow runs AKA the "current" time AKA the value of the expression utcNow()
and
2. the next occurence of 2:00AM (let's agree to call it 2:00AM tomorrow morning since we'll assume that the flow is executing "today")
To calculate that time gap we need to know both of those points in time.
The first one is easy: the expression utcNow() returns that exact value. If the flow executes today at 12 noon UTC, the value of utcNow() will be 2020-11-09T12:00:00Z (utcNow() is a datetime value, hence why it has the date in it also). Keep in mind that UTC is five hours ahead of EST so when the value of utcNow() is 12pm (noon), it's actually 7:00AM EST.
The second point in time is a little more tricky to figure out, but it involves finding a concrete reference point from which we can calculate when (in how many hours) 2:00AM tomorrow morning will occur. @tom_riha's expression above does just that by using a starting point of 00:00 this morning, the beginning of the day, by taking utcNow() and removing the time component; this effectively reduces the time component to 00:00 as he explained above. So, now, it doesn't matter when utcNow() is; the above expression will always return 00:00 (i.e. midnight) this morning.
Since 2:00AM tomorrow morning will always be 26 hours after 00:00 this morning, we can add 26 hours to 00:00 this morning to get the datetime of 2:00AM tomorrow morning.
HOWEVER!
Remember that all of the numbers we just crunched are based on utcNow() which returns the datetime in the UTC time zone. With no adjustments, the above calculations will return datetimes five hours EARLIER for each of the calculated values. So, if the flow was run at noon today UTC, you'd get the following values in for the respective time zones:
UTC (desired):
utcNow() = 2020-11-09T12:00:00Z
utcNow('yyyy-MM-dd') = 2020-11-09T00:00:00Z
addHours(utcNow('yyyy-MM-dd'),26,'yyyy-MM-ddTHH:mmZ') = 2020-11-10T02:00:00Z
EST (actual):
utcNow() = 2020-11-09T07:00:00Z
utcNow('yyyy-MM-dd') = 2020-11-08T19:00:00Z
addHours(utcNow('yyyy-MM-dd'),26,'yyyy-MM-ddTHH:mmZ') = 2020-11-09T21:00:00Z
If that makes sense, then it's clear now that an adjustment has to be made to the value that is being passed into the Delay Until action block.
Either you can add five hours to the "26" in the expression above, OR, you can pass that expression into a Convert Time Zone action block and pass the output of that into the Delay Until.
Does that makes sense?
thanks,
Kyle
@Anonymous , @tom_riha
I'm still not sure we are on the right path...the GetUTCNow with the formatting applies to when the flow was triggered correct? I think I need to apply the Get UTCNow to when the approval occurs and set specific value vs setting in relation to when the flow was triggered. No? Because it could be 2 hour or two days before the approval step is completed and if the Get UTCNow applies to when the flow is triggered rather than when the approval occurs then the file update could happen prematurely, correct? If the GetUTCNow is nested below the Condition, would it pull the UTC of when the approval occurs or the UTC of when the flow initially triggers?
THx all!
Are you attending the Microsoft Power Platform Conference 2023 in Las Vegas? If so, we invite you to join us for the MPPC's Got Power Talent Show! Our talent show is more than a show—it's a grand celebration of connection, inspiration, and shared journeys. Through stories, skills, and collective experiences, we come together to uplift, inspire, and revel in the magic of our community's diverse talents. This year, our talent event promises to be an unforgettable experience, echoing louder and brighter than anything you've seen before. We're casting a wider net with three captivating categories: Demo Technical Solutions: Show us your Power Platform innovations, be it apps, flows, chatbots, websites or dashboards... Storytelling: Share tales of your journey with Power Platform. Hidden Talents: Unveil your creative side—be it dancing, singing, rapping, poetry, or comedy. Let your talent shine! Got That Special Spark? A Story That Demands to Be Heard? Your moment is now! Sign up to Showcase Your Brilliance: https://aka.ms/MPPCGotPowerSignUp Deadline for submissions: Thursday, Sept 28th How It Works: Submit this form to sign up: https://aka.ms/MPPCGotPowerSignUp We'll contact you if you're selected. Get ready to be onstage! The Spotlight is Yours: Each participant has 3-5 minutes to shine, with insightful commentary from our panel of judges. We’re not just giving you a stage; we’re handing you the platform to make your mark. Be the Story We Tell: Your talents and narratives will not just entertain but inspire, serving as the bedrock for our community’s future stories and successes. Celebration, Surprises, and Connections: As the curtain falls, the excitement continues! Await surprise awards and seize the chance to mingle with industry experts, Microsoft Power Platform leaders, and community luminaries. It's not just a show; it's an opportunity to forge connections and celebrate shared successes. Event Details: Date and Time: Wed Oct 4th, 6:30-9:00PM Location: MPPC23 at the MGM Grand, Las Vegas, NV, USA
The Reading Dynamics 365 and Power Platform User Group is a community-driven initiative that started in September 2022. It has quickly earned recognition for its enthusiastic leadership and resilience in the face of challenges. With a focus on promoting learning and networking among professionals in the Dynamics 365 and Power Platform ecosystem, the group has grown steadily and gained a reputation for its commitment to its members! The group, which had its inaugural event in January 2023 at the Microsoft UK Headquarters in Reading, has since organized three successful gatherings, including a recent social lunch. They maintain a regular schedule of four events per year, each attended by an average of 20-25 enthusiastic participants who enjoy engaging talks and, of course, pizza. The Reading User Group's presence is primarily spread through LinkedIn and Meetup, with the support of the wider community. This thriving community is managed by a dedicated team consisting of Fraser Dear, Tim Leung, and Andrew Bibby, who serves as the main point of contact for the UK Dynamics 365 and Power Platform User Groups. Andrew Bibby, an active figure in the Dynamics 365 and Power Platform community, nominated this group due to his admiration for the Reading UK User Group's efforts. He emphasized their remarkable enthusiasm and success in running the group, noting that they navigated challenges such as finding venues with resilience and smiles on their faces. Despite being a relatively new group with 20-30 members, they have managed to achieve high attendance at their meetings. The group's journey began when Fraser Dear moved to the Reading area and realized the absence of a user group catering to professionals in the Dynamics 365 and Power Platform space. He reached out to Andrew, who provided valuable guidance and support, allowing the Reading User Group to officially join the UK Dynamics 365 and Power Platform User Groups community. One of the group's notable achievements was overcoming the challenge of finding a suitable venue. Initially, their "home" was the Microsoft UK HQ in Reading. However, due to office closures, they had to seek a new location with limited time. Fortunately, a connection with Stephanie Stacey from Microsoft led them to Reading College and its Institute of Technology. The college generously offered them event space and support, forging a mutually beneficial partnership where the group promotes the Institute and encourages its members to support the next generation of IT professionals. With the dedication of its leadership team, the Reading Dynamics 365 and Power Platform User Group is poised to continue growing and thriving! Their story exemplifies the power of community-driven initiatives and the positive impact they can have on professional development and networking in the tech industry. As they move forward with their upcoming events and collaborations with Reading College, the group is likely to remain a valuable resource for professionals in the Reading area and beyond.
As the sun sets on the #SummerofSolutions Challenge, it's time to reflect and celebrate! The journey we embarked upon together was not just about providing answers – it was about fostering a sense of community, encouraging collaboration, and unlocking the true potential of the Power Platform tools. From the initial announcement to the final week's push, the Summer of Solutions Challenge has been a whirlwind of engagement and growth. It was a call to action for every member of our Power Platform community, urging them to contribute their expertise, engage in discussions, and elevate collective knowledge across the community as part of the low-code revolution. Reflecting on the Impact As the challenge ends, it's essential to reflect on the impact it’s had across our Power Platform communities: Community Resilience: The challenge demonstrated the resilience of our community. Despite geographical distances and diverse backgrounds, we came together to contribute, learn, and collaborate. This resilience is the cornerstone of our collective strength.Diverse Expertise: The solutions shared during the challenge underscore the incredible expertise within our community. From intricate technical insights to creative problem-solving, our members showcased their diverse skill sets, enhancing our community's depth.Shared Learning: Solutions spurred shared learning. They provided opportunities for members to grasp new concepts, expand their horizons, and uncover the Power Platform tools' untapped potential. This learning ripple effect will continue to shape our growth. Empowerment: Solutions empowered community members. They validated their knowledge, boosted their confidence, and highlighted their contributions. Each solution shared was a step towards personal and communal empowerment. We are proud and thankful as we conclude the Summer of Solutions Challenge. The challenge showed the potential of teamwork, the benefit of knowledge-sharing, and the resilience of our Power Platform community. The solutions offered by each member are more than just answers; they are the expression of our shared commitment to innovation, growth, and progress! Drum roll, Please... And now, without further ado, it's time to announce the winners who have risen above the rest in the Summer of Solutions Challenge! These are the top community users and Super Users who have not only earned recognition but have become beacons of inspiration for us all. Power Apps Community: Community User Winner: @SpongYe Super User Winner: Pending Acceptance Power Automate Community: Community User Winner: @trice602 Super User Winner: @Expiscornovus Power Virtual Agents Community: Community User Winner: Pending AcceptanceSuper User: Pending Acceptance Power Pages Community: Community User Winner: @OOlashyn Super User Winner: @ChristianAbata We are also pleased to announced two additional tickets that we are awarding to the Overall Top Solution providers in the following communities: Power Apps: @LaurensM Power Automate: @ManishSolanki Thank you for making this challenge a resounding success. Your participation has reaffirmed the strength of our community and the boundless potential that lies within each of us. Let's keep the spirit of collaboration alive as we continue on this incredible journey in Power Platform together.Winners, we will see you in Vegas! Every other amazing solutions superstar, we will see you in the Community!Congratulations, everyone!
Ayonija Shatakshi, a seasoned senior consultant at Improving, Ohio, is a passionate advocate for M365, SharePoint, Power Platform, and Azure, recognizing how they synergize to deliver top-notch solutions. Recently, we asked Ayonija to share her journey as a user group leader, shedding light on her motivations and the benefits she's reaped from her community involvement. Ayonija embarked on her role as a user group leader in December 2022, driven by a desire to explore how the community leveraged various Power Platform components. When she couldn't find a suitable local group, she decided to create one herself! Speaking about the impact of the community on her professional and personal growth, Ayonija says, "It's fascinating to witness how everyone navigates the world of Power Platform, dealing with license constraints and keeping up with new features. There's so much to learn from their experiences.: Her favorite aspect of being a user group leader is the opportunity to network and engage in face-to-face discussions with fellow enthusiasts, fostering deeper connections within the community. Offering advice to budding user group leaders, Ayonija emphasized the importance of communication and consistency, two pillars that sustain any successful community initiative. When asked why she encourages others to become user group leaders, Ayonija said, "Being part of a user group is one of the best ways to connect with experienced professionals in the same field and glean knowledge from them. If there isn't a local group, consider starting one; you'll soon find like-minded individuals." Her highlight from the past year as a user group leader was witnessing consistent growth within the group, a testament to the thriving community she has nurtured. Advocating for user group participation, Ayonija stated, "It's the fastest route to learning from the community, gaining insights, and staying updated on industry trends." Check out her group: Cleveland Power Platform User Group
Hear from Corporate Vice President for Microsoft Business Applications & Platform, Charles Lamanna, as he looks ahead to the second annual Microsoft Power Platform Conference from October 3rd-5th 2023 at the MGM Grand in Las Vegas.Have you got your tickets yet? Register today at www.powerplatformconf.com
We wanted to take the time to celebrate and welcome the new user groups that have joined our community. Along with that take a look at the event that might be happening near you or virtually. Please welcome: Biz Apps Community User Group - Power Platform Community (microsoft.com) This user group is dedicated for all community members of all skill levels to learn how to get the most out of their community experience. East Michigan Power Platform User Group - Power Platform Community (microsoft.com) This is hopefully the beginning of a community, covering eastern Michigan, built around the Power Platform. Biz Apps Community User Group This user group is dedicated for all community members of all skill levels to learn how to get the most out of their community experience. Events to checkout: In-Person: September 2023 Hybrid Philadelphia Dynamics 365 & Power Platform User Group MeetDynamics 365 and Power Platform Physical Meetup Hyderabad Power Platform User Group Meetup - Sept 2023 (In-Person)Manchester September 2023 In Person Meeting Virtual: Everything Dataverse, Do you know that Dataverse is more than just a Database!POWER PLATFORM MONTHLY DIGEST- SEPTEMBERBaltic Summit 2023PL-900 Power Platform Fundamentals TrainingHR and L&D transformation through Power PlatformDynamics 365 Marketing Experience User Groups - Use Cases and NetworkingPower Platform and Dual Write from Dynamics 365 F&O PerspectiveANZ D365 FinOps Team September 2023 meetup
User | Count |
---|---|
71 | |
41 | |
38 | |
28 | |
24 |
User | Count |
---|---|
89 | |
85 | |
56 | |
56 | |
51 |