At the moment when the expiry date pasts the todays date the status chnages from Due to Expired - this all works.
I am trying to set up a flow, so that when expired items are older then a year the status becomes Archived.
I just cant get it to work?
I have used the following:
The column of the date is called ExpiryDate
addDays(items('Apply_to_each')?['ExpiryDate'],365)
formatDateTime(utcNow(),'yyyy-MM-dd')
Hello @SLCLARKE ,
instead of using 'Get items' to get all items and then loop through them and evaluate them one by one, you could filter them right away in the 'Get items'. That way it'll return only the items that fit the condition and you can process them directly in the loop without the condition.
The Filter Query in 'Get items' might look like below:
ExpiryDate lt '@{getPastTime(1,'Year')}'
Thank you for your help. I just have the following error:
Hello @SLCLARKE ,
as the error tells you, you can't use calculated column in the 'Filter Query'. You must move the calculation from the column directly into the flow as explained here and base it on the date column that you use as the source for the calculated one.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
31 | |
27 | |
27 | |
21 | |
10 |