cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Angel-007
Regular Visitor

Updating Data based on data from another

Greetings to all,

I have a SharePoint Online list that tracks certain projects in our department. There are several columns that track different data of the projects. One of the columns is a choice column that designates the project "Open" or "Close". Another column is a Number Column that tracks the percentage of completions like 10, 20, 50, or 100. Not sure how to configure so when the project is 100 the status changes automatically to "Close". Any help will be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
CraigStewart
Super User
Super User

Hi

 

I think this is what you're after

 

You'll start with trigger "When an item is created or modified" point to your site and list

 

The next step is "Get changes for an item or a file (properties only)

CraigStewart_0-1650145611442.png

 

 

 

 

Id from your previous step

 

Trigger Window Start Token 

Trigger Window End Token

 

CraigStewart_1-1650145681986.png

Then you'll need your condition.

 

On the test I just did I created a sharepoint list with a status and a final field

 

CraigStewart_2-1650145776220.png

And set my condition to when status is "two" update Final to yes

 

CraigStewart_3-1650145842919.png

This needs "Has Column status changed: Status" is equal to true

AND

"Status Value" is equal to two

 

If both conditions are met then the actions in YES are Update item

CraigStewart_4-1650145968511.png

 

Hope that helps

 

Craig

 

Edit.

You can also add a trigger condition on the When an item is created or modified, in the settings for the specific field you need so it should only trigger when that field is changed to what you set (i.e 100). That should stop unnecessary triggering of your flow.

 

@equals(triggerBody()?['Status']?['value'],'two')

CraigStewart_0-1650147612815.png

A second trigger will be needed to stop this running twice as the trigger is basically looking first if an item is modified and if so is the selected column set as 'two' in my case, which would result in the flow failing

 

@equals(triggerBody()?['YOUROPENCLOSECOLUMN']?['value'],'Open')

@not(equals(triggerBody()?['YOURNUMBERCOLUMN'],100))

 

CraigStewart_0-1650149695412.png

 

 

View solution in original post

3 REPLIES 3
CraigStewart
Super User
Super User

Hi

 

I think this is what you're after

 

You'll start with trigger "When an item is created or modified" point to your site and list

 

The next step is "Get changes for an item or a file (properties only)

CraigStewart_0-1650145611442.png

 

 

 

 

Id from your previous step

 

Trigger Window Start Token 

Trigger Window End Token

 

CraigStewart_1-1650145681986.png

Then you'll need your condition.

 

On the test I just did I created a sharepoint list with a status and a final field

 

CraigStewart_2-1650145776220.png

And set my condition to when status is "two" update Final to yes

 

CraigStewart_3-1650145842919.png

This needs "Has Column status changed: Status" is equal to true

AND

"Status Value" is equal to two

 

If both conditions are met then the actions in YES are Update item

CraigStewart_4-1650145968511.png

 

Hope that helps

 

Craig

 

Edit.

You can also add a trigger condition on the When an item is created or modified, in the settings for the specific field you need so it should only trigger when that field is changed to what you set (i.e 100). That should stop unnecessary triggering of your flow.

 

@equals(triggerBody()?['Status']?['value'],'two')

CraigStewart_0-1650147612815.png

A second trigger will be needed to stop this running twice as the trigger is basically looking first if an item is modified and if so is the selected column set as 'two' in my case, which would result in the flow failing

 

@equals(triggerBody()?['YOUROPENCLOSECOLUMN']?['value'],'Open')

@not(equals(triggerBody()?['YOURNUMBERCOLUMN'],100))

 

CraigStewart_0-1650149695412.png

 

 

Thank you. That worked!  🙂

CraigStewart
Super User
Super User

Super news. Glad I could help. 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,020)