cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BARD
Advocate II
Advocate II

If Sharepoint List Items Meet Condition then Get Data from SQL and Update them

I feel like I must be missing something as this seems so simple but if I have a sharepoint list that I need to look at for a condition in one column, grab items nmatching condition, check SQL (using key from SP List to match key from SQL) for what they need to be updated to and then update sharepoint list. (Basically sync a column from SQL to Sharepoint List)

 

Original Sharepoint List

Key    ||  Column A || Column B || Column C

Key 1 ||       Tom     ||     Red      ||      1

Key 2 ||       Joe       ||     Red      ||      1

Key 3 ||       Ann      ||     Red      ||      2

Key 4 ||       Mary    ||     Red      ||      3

Key 5 ||       Tom     ||     Red      ||      3

 

Where Column C is not 3 check SQL Column with cooresponding Key row and find value in colum 5 then use that value to update sharepoint Column C for the cooresponding Key row

 

SQL

Key    ||  Column 1   || Column 2   ...  || Column 5

Key 1 ||       Up         ||     Apple         ||      3

Key 2 ||       Down    ||     Orange       ||      1

Key 3 ||       Down    ||     Bannana     ||      3

Key 4 ||       Down    ||     Pear            ||      3

Key 5 ||       Up         ||     Grape         ||      3

 

 

Updated Sharepoint List Expectation

Key    ||  Column A || Column B || Column C

Key 1 ||       Tom     ||     Red      ||      3

Key 2 ||       Joe       ||     Red      ||      1

Key 3 ||       Ann      ||     Red      ||      3

Key 4 ||       Mary    ||     Red      ||      3

Key 5 ||       Tom     ||     Red      ||      3

 

I can run this on a schedule every few minutes or when a SQL row matching the original SP List condition row is modified.

1 REPLY 1
v-bacao-msft
Community Support
Community Support

 

Hi @BARD ,

 

Could you share a screenshot of the Flow configuration?

Basically, you just need to find the specified item according to the key column to update.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,679)