cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SLCLARKE
Helper II
Helper II

Update a Status on SharePoint using a Flow

Hi,

 

I have an idea, and I cant find anything on Google on whether it is possible.

 

I currently have a list of certificates on SharePoint. I have a column with the Status (Active, Expired etc) and then a column with the Expiry date. Is it possible that when it goes past the expiry date, the status column automatically updates from Active to expired?

 

Thank you

6 REPLIES 6
DAllen365
Resolver III
Resolver III

@SLCLARKE Sure this is absolutely possible.  I would design a scheduled flow that would be something like this:

 

  • Schedule the flow to run daily at whatever time
  • Convert time from UTC to your time zone, output in yyyy-MM-dd format (action)
  • Get SharePoint items, with a filter where Status ne Expired and formatdatetime(ExpiraryDate,'yyyy-MM-dd) eq <convertedtime>
  • Foreach item
  • Update item, Status to Expired

I can try to write up a full example later tonight if you need it but hope this helps you get on the right track.  Just reply with any questions!


----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi, Would you mind drawing me up an example, ive really lost myself, thank you.

This is what I have done so far.....

SLCLARKE_1-1630676348668.png

 

SLCLARKE_2-1630676397804.png

 

 

Sure I will write up a quick sample for you as soon as I can, should be shortly.


----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

DAllen365
Resolver III
Resolver III

@SLCLARKE Hey I have working sample for you.  I have a SharePoint list with these values:

DAllen365_0-1630683436118.png

In your scenario, we want to get all items where expiry date is older than today, and for each record set its status to Expired.  In my example, I am also only getting items that are not Completed and a past Expiry Date.  When this runs, it should only update item 1 and set its Status to Expired.  Here is the flow:

DAllen365_1-1630683592341.png

DAllen365_2-1630683630222.png

 

After running, it only changed this value as we wanted:

DAllen365_3-1630683748697.png

 

I hope this helps you with your flow.  Technically the convert time zone action isn't necessary and you could do that inline of the filter criteria, but for this purpose I thought it was simpler to separate it.  I also added some simple column formatting to highlight the potential records that would need to be updated.  Let me know if you have any questions.

 

Doug
----------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

 

v-LilyW-msft
Community Support
Community Support

Hi @SLCLARKE 

Has your problem been solved?

Please take a try with @DAllen365  's solution, if the solution helps, please consider Accept it as the solution to help the other members find it more quickly.

Best Regards

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,218)