Forum Discussion
Update a choice column based on date
- Oct 25, 2021
Torbjorn_Andersson the flow to do this is as follows and in this example we will change Alison Krauss from New Hire to Working as she starts today:
The flow will run once a day at 8am:
We get the items from the list where the Status is 'New Hire'
Format today's date with a Compose and the expression formatDateTime(utcNow(),'yyyy-MM-dd')
As we've used Get items, add an apply to each and inside it add another Compose control and get the start date then format that with another Compose control and the expression formatDateTime(outputs('ComposeStart'),'yyyy-MM-dd')
Next, add a condition to check if the output of the ComposeFormatStart is equal to the ComposeToday:If it is, update the Status value to Working:
And this is the result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Torbjorn_Andersson the flow to do this is as follows and in this example we will change Alison Krauss from New Hire to Working as she starts today:
The flow will run once a day at 8am:
We get the items from the list where the Status is 'New Hire'
Format today's date with a Compose and the expression formatDateTime(utcNow(),'yyyy-MM-dd')
As we've used Get items, add an apply to each and inside it add another Compose control and get the start date then format that with another Compose control and the expression formatDateTime(outputs('ComposeStart'),'yyyy-MM-dd')
Next, add a condition to check if the output of the ComposeFormatStart is equal to the ComposeToday:
If it is, update the Status value to Working:
And this is the result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
I don't know what I do wrong, but I was trying your process but is not working for me, obviously I miss something here:
I am new using Flow, I appreciate any help!
- RobElliottJan 19, 2023Silver Contributor
lcdelgado from what I can see you've not got an apply to each which you need (see my earlier screenshots).
- lcdelgadoJan 19, 2023Copper ContributorI'm sorry but I still have the same error, can you show me the earlier screenshots?
- RobElliottJan 20, 2023Silver ContributorScroll up the thread!
- lcdelgadoJan 19, 2023Copper ContributorHow many compose do you have? 3? ComposeToday, ComposeStart and ComposeFormatStart?
- lcdelgadoJan 19, 2023Copper ContributorOk, Let me see your earlier screenshots, thanks for the reply