Hello everyone
I work with a sharepoint list, where I change the status of the projects. However, sharepoint does not store the date of status change.
I created 7 date columns for the 7 status choices a project can take.
Goal: If I change the status of a project to "delivered" on May 23rd, the list column date_delivered is filled with the date May 23rd.
For filling the date of status change in the list, I have a Flow full of conditions inside conditions...(nested 7 times):
I would like to improve it using variables, apply to each or any other trick.
Condition 1: "Has column changed" is equal to "true"
If yes
Condition 1: "Has column changed" is equal to "true"
If yes
Condition 2: "Status Value" is equal to "Commisioning
If yes Update Item "commisioning" column gets input utcNow()
If no
Condition 1: "Has column changed" is equal to "true"
If yes
Condition 2: "Status Value" is equal to "Commisioning
If yes Update Item "commisioning" column gets input utcNow()
If no
Condition 3: "Status value" is equal to "ready for shipment"
If yes Update Item "ready for shiptment" column gets input utcNow()
If no
Condition 4:
.
.
.
until I covered all status columns/possibilities.
Any suggestions would be much appreciated.
Solved! Go to Solution.
Swap out the nested IF statements after the first one for a switch based on the text of the status value. That will let you do it in 2 layers.
Condition 1: "Has column changed" is equal to "true"
if yes
Switch on lowercase(Status Value)
Case: "commisioning"
Update Item "commisioning" column gets input utcNow()
Case: "ready for shipment"
Update Item "ready for shipment" column gets input utcNow()
etc. until all cases are complete
Swap out the nested IF statements after the first one for a switch based on the text of the status value. That will let you do it in 2 layers.
Condition 1: "Has column changed" is equal to "true"
if yes
Switch on lowercase(Status Value)
Case: "commisioning"
Update Item "commisioning" column gets input utcNow()
Case: "ready for shipment"
Update Item "ready for shipment" column gets input utcNow()
etc. until all cases are complete
Thank you very much. What a relief to know there is something called "Switch". Worked perfectly.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
69 | |
21 | |
18 | |
17 | |
13 |
User | Count |
---|---|
125 | |
37 | |
29 | |
28 | |
26 |