cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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.

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

Regular Visitor

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

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?

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

I'll try that, it sounds brilliant!

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,041)