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

Scheduled Flow to Update Status on SharePoint when Item Expires - ERROR

I am just writing a flow to update the status within my library when the document expires.

 

So this is what I wrote......

SLCLARKE_0-1634121065421.png

 

And this is the error which comes up.....

SLCLARKE_1-1634121125575.png

"Unable to process template language expressions for action 'Condition' at line '1' and column '14319': 'The template language function 'greaterOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Null' that do not match.'."

 

I think it is possibly because there is quite a number of files which don't have an expiry date marked in them, so they are just empty?

 

Any help much appreciated.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SLCLARKE 

Yes, when there is a null value in the WC Expiry column, the error mentioned in your post will appear. You can filter out items with expiry date, and then judge whether their dates have expired.

I set up a simple flow, you can refer to the screenshots below.

This is my test library.

vLilyWmsft_5-1634180295149.png

vLilyWmsft_2-1634180045993.png

Note: You can find column internal name via List settings -> Click on the column name -> It’s at the end of the URL on the Edit column page, after ‘Field=’.

vLilyWmsft_3-1634180166005.png

vLilyWmsft_4-1634180200214.png

vLilyWmsft_1-1634179887163.png

After flow runs,the status of these expired files will be changed.

vLilyWmsft_6-1634180416411.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
happyume
Solution Sage
Solution Sage

You can make your Flow work (plus more efficient) if you use Filter Query on Get Files (Properties Only) step. This way you will only retrieve files which satisfy your Filter Query (business requirement) and thus within Apply to Each, you don't have to use condition block either.

 

Modified lt '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'

 

happyume_0-1634121804661.png

 

Note: I have used Modified column (as example), but you can use any other date column from your SharePoint Document Library.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Ah, that hasn't worked. Just a different error now.

SLCLARKE_0-1634122160541.pngSLCLARKE_1-1634122170564.png

 

happyume
Solution Sage
Solution Sage

Sorry, the screenshots are not large/clear enough to decipher anything meaningful.

Is your column name WC Expiry?- then most likely you need to use WCExpiry (without space)

 

On your SharePoint, click on Library Settings -> and then half way through the page, click on the column name you are interested in. From the new page that opens, you will see URL ending with &Field=COLUMN_NAME

 

You need to use this COLUMN_NAME in your Filter Query. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Thank you, I have updated the column Name but it still doesn't work, so i will be remove this filter and try and work on the Original error. I'm sure the is a formula that can be added, for those empty boxes. 

Hi @SLCLARKE 

Yes, when there is a null value in the WC Expiry column, the error mentioned in your post will appear. You can filter out items with expiry date, and then judge whether their dates have expired.

I set up a simple flow, you can refer to the screenshots below.

This is my test library.

vLilyWmsft_5-1634180295149.png

vLilyWmsft_2-1634180045993.png

Note: You can find column internal name via List settings -> Click on the column name -> It’s at the end of the URL on the Edit column page, after ‘Field=’.

vLilyWmsft_3-1634180166005.png

vLilyWmsft_4-1634180200214.png

vLilyWmsft_1-1634179887163.png

After flow runs,the status of these expired files will be changed.

vLilyWmsft_6-1634180416411.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, this works perfectly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,454)