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
- R_KlompSep 12, 2023Copper Contributor
RobElliott Dear Rob,
I am trying this flow as well. I want status Up to date (when todays date is before end date) and status Expired (when todays date is after end date). See example below. I managed to create the flow expired, but Up to date is giving error.
I used formatDateTime(outputs('ComposeEnd'),'yyyy-MM-dd') in stead of ComposeStart. Why is it not working?
The flow works, because status changes to Up to date. But Microsoft tells me run failed, but see image, only checks.
Thank you in advance for your help.
Kind regards.
- Dotson_JJun 13, 2023Copper Contributor
Good Day Sir,
I am trying to follow your instructions on setting up a flow to have one of my Choice Columns update based on todays date. Below are screen shots of everything I copied from your post, I would be most thankful if you can find out why I keep getting an error stating my "Status" column doesn't exist.
I particularly want my Status Column to update from 'Completed' to 'On Leave' when the LV Start Column hits today's date.
Any help on this matter would be greatly appreciated, thank you in advance!
- RobElliottJun 14, 2023Silver Contributor
Dotson_J check what the internal name of the column is from list settings then edit the column. In the address bar at the top the internal name is after field=
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)- Dotson_JJun 14, 2023Copper Contributor
RobElliott Good Day and thank you! I went to the column settings and in the URL it said "Field=Category" So I used Category eq 'Completed' and no more error occurred.
Thank you once again!
- lcdelgadoJan 19, 2023Copper Contributor
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?