Post/ask in a Power Automate forum:
Creating an expression for a condition in Apply to each, Power Automate
I am trying to create a flow that updates a status on a list. I have a column for status which is a choice of "Approved" or "Expired". The default entry is approved and I want it to update to expired when the previous column "approved Year" is 5 years past. So i.e. if approved year is 2019 it will update to expired when the flow is run. I have attached what I have and the condition I have added is lessOrEquals( formatDateTime( addToTime( coalesce(items('Apply_to_each')?['Approved_x0020_Year'], '2000-01-01T00:00:00Z'), 5, 'Year' ), 'yyyy-MM-ddTHH:mm:ssZ' ), formatDateTime(utcNow(), 'yyyy-MM-ddTHH:mm:ssZ') ) I don't know how to write the expression myself so this has been provided by chat GPT.
Microsoft 365 Insider | Other
1 answer
Sort by: Most helpful
-
Gérard Oomens 111.5K Reputation points Volunteer Moderator2025-10-13T21:27:24.5366667+00:00