Forum Discussion
Add date completed when status is changed
tomscrace yes this can be done with a simple flow in Power Automate. You MUST make sure that versioning is activated in your list settings.
In this example we'll change the status of Bedar to Completed:
This is the trigger:
Next, add the get the changes for an item or a file (properties only) action. In the Since field we need to check what has changed since the previous version, so add the expression:
sub(int(triggerOutputs()?['body/{VersionNumber}']),1)
Next, add a condition to check it's the Status column that has cahnged AND the status is Completed
If that is the case then update the item in the list with the current date and time in the Completed date/time column:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- ganeshsanapJun 16, 2023MVP
Ejgp_72 What piece you didn't understand in the update item action?
Values for ID and Title properties are coming from the trigger outputs (when an item or file is modified).
And for Completed date column, RobElliott is passing the utcNow() via flow expression (by clicking Add dynamic content option you see in the images). utcNow() function returns the current date and timestamp.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- DianaGusevaAug 29, 2023Copper Contributor
Good day
I am trying to update "Assigned coaching date" with current date when "Coaching status" column have been changed.
I was following the flow https://techcommunity.microsoft.com/t5/sharepoint/add-date-completed-when-status-is-changed/m-p/2636031 and once I started testing it, it removes information from email "title column"
Here is my flow:
Would you know why this flow would be deleting information from another column? "Email title" in my case.
Thank you.
Di.
- ganeshsanapAug 30, 2023MVP
DianaGuseva I don't see "Email title" in your update item action. Are you talking about "Title" column?
If column is not required/mandatory in the SharePoint list, you don't need to pass any value to that column from update item action - you can keep the blank value.
If the column is required/mandatory in the SharePoint list, you can pass the same column value you get from trigger outputs to that particular column - you can set it with the help of "dynamic content" section.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.