how to create a closed time column in Sharepoint list

Lihi Zin 40 Reputation points
2023-12-06T13:38:56.87+00:00

Hey,

I'm trying to create a column in a Sharepoint list like "Created On" Date column for my "Closed On" column. I want the date to automatically populate once I change status from Active or Pending to Closed.

Is it possible?

Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2023-12-07T05:33:52.42+00:00

    Hi @Lihi Zin,

    Thank you for posting in this community.

    If you are using SharePoint Online, then we can create a power automate flow to update the date.

    Here are steps:

    1.I create a list which has a "status" column and a "Closed On" column. "status" column is a choice column (Active, Pending and Closed) and "Closed On" is a date column.

    User's image

    2.Open Power Automate portal.

    User's image

    3.Create > Automate cloud flow.

    User's image

    4.Input your flow name and select your flow's trigger: When an item is created or modified.

    User's image

    5.Action1 When an item is created or modified:

    Select your List in Parameters tab.

    1

    Add a Trigger condition under the Setting tab to ensure that the flow is triggered only when the item is modified.

    @not(equals(triggerBody()['Created'],triggerBody()['Modified']))
    

    2

    6.Action2 Get item:

    Get information about the item you just modified by ID.

    3

    User's image

    7.Action 3 Condition:

    Determine if the value of your item's Status column is Closed. You can select the column by clicking on the little lightning bolt icon as in the previous step.

    User's image

    8.Action4 Update item:

    Creates the action under the condition of True. Again select the ID of the item you want to modify and the values of the other columns you don't need to change via the lightning bolt icon. For Closed on columns please add the function by using the function button a couple of clicks down.

    formatDateTime(utcNow(),'MM/dd/yyyy')
    

    The first parameter of formatDateTime is to get the current date, the second is to set the date display style, you can define the display style you want.

    4

    User's image

    9.Save the flow and now you can test this flow in your list.

    User's image

    10.The first time you run the flow it will take a little longer, you can wait a minute and then refresh the page to see the date is automatically filled.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Klaudia 0 Reputation points
    2025-03-03T10:17:41.1+00:00

    Hi,

    I don't have a Title field in Action4 Update Item, without it an error appears in my Flow. Can you please help me with this? Am I doing something wrong?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.