cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Abou
Regular Visitor

Sharepoint List Field Update with today's date (Very needed)

Is there any way in Flow to update a SharePoint List field with today's date. @utcnow() doesn't work.

8 REPLIES 8
Community Support
Community Support

Re: Sharepoint List Field Update with today's date (Very needed)

Hi,

 

I've seen one similar thread saying that the utcnow() only works in the condition field and you might need tog rab the current time from http://www.timeapi.org/utc/now as the current workaround. See here:

https://powerusers.microsoft.com/t5/Flow-Forum/utcnow-DateTimeStamp/m-p/10979#M2587

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Abou
Regular Visitor

Re: Sharepoint List Field Update with today's date (Very needed)

http://www.timeapi.org/ Site is not working.

Lance2017
Regular Visitor

Re: Sharepoint List Field Update with today's date (Very needed)

On your flow, you have a Update Item section to update your sharepoint list field. You cannot get today's date with that section. However, there is a workaround. Add another Update Item right after ths action. It will be named Update Item 2. Now you can access "Update Item"'s Modified. This field will be today's date. today.PNG

kirberry
Frequent Visitor

Re: Sharepoint List Field Update with today's date (Very needed)

But every time the list is updated this date will change.  What if you need to capture the date a checkbox has been clicked but then end the workflow, like a Set Field, instead of Update Field?

JimKline
New Member

Re: Sharepoint List Field Update with today's date (Very needed)

I had a similar need to only perform an action if a condition were set to "Yes" (check box "Send Email"). The challenge is that if your trigger is a check box that is to be set to "Yes" in order for your flow to execute, then the flow will execute everytime the list is updated because the check box is set to "Yes."  This you already know! Your spec for this flow is that it is to execute successfully only one time! My solution was to add another field to my list (Yes/No) defaulted to "No." This field is being used as a "trap" to capture the successful execution of the flow the first time.  In my scenario an email is to be sent. Once the email has been sent by the flow I then update the "Trap" to "Yes" before the flow completes. Now I have the ability to "steer" the flow such that when any item is updated in my list, the flow "Tests" the "Trap" to make sure an email for that particular record has not been sent before. If the "Trap" is set to "Yes" the flow terminates. If it is set to "No" then it looks at the trigger check box "send email" to see if it is set to "Yes." If Yes the flow sends the email and then updates the "Trap" to "Yes" before terminating. If someone inadvertently switches the "Sent Email" checkbox back to "No" (which is possible because the list is used in  a Power App) the flow will terminate because the trap has already been set to "Yes" preventing further execution.Bottom line you need two conditions, in your case a date change but then a post execution confirmation that the flow was successful. This structure for my flow uses more steps then necessary. I will modify this flow to incorporate a logic "And" to test for both conditions. As someone once told me when designing something new "Jsut get something that works on paper, it is easier to upgrade and enhance once something is working."  "KISS" Keep It Software Simple!Smiley Happy

 

Hope this helps. JK

kirberry
Frequent Visitor

Re: Sharepoint List Field Update with today's date (Very needed)

I'll try that, it sounds brilliant!

Highlighted
monyocska
New Member

Re: Sharepoint List Field Update with today's date (Very needed)

Hi kirberry,

Have you tried the solution. Did it work? If yes, it would be great if you cuold share the method with us.

 

Thanks,

Monica

kirberry
Frequent Visitor

Re: Sharepoint List Field Update with today's date (Very needed)

Hi Monica,

 

I haven't had the time to try out this solution yet, my users decided to put the date in manually. it is still something I'd like to try for future use, butI'm sorry I don't have more to tell you 😞

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,801)