cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thatsme
Regular Visitor

Need to update a SharePoint List based on changes in an Excel file

Hi all,

 

I could need some help in building a proper flow for my problem...

 

A have SharePoint list with plenty of individual items and each item has a date. This list is based on an Excel file I got as a data input. Now every once in a while I get an updated Excel list with changes in the dates, which I need to mirror to the SharePoint list.

 

My plan so far:

In Excel I use Power Query to compare the old Excel list (mirror of SharePoint list) with new Excel. Whenever a date has changed for a given item, I add an "x" in a new conditional column. So now I have an Excel list where every item with a date change is marked.

 

Now I want to make a flow, that reads the excel list and runs a loop. For every "x" in the list, get the item number and go to the corresponding SharePoint list item (ID is the the same) and update the date field.

 

My problem:

I can´t get this loop done. I have the Excel list with "x" markings. I can read it into the flow. But how can I now run the loop? All my tries blatantly failed... Please help.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @Thatsme ,

 

I have made a simple test for your reference.

 

1. Here is my list and excel table.

vyujincuimsft_0-1658741818772.png

2. Here is my Flow.

vyujincuimsft_2-1658742495802.png

vyujincuimsft_3-1658742622612.png

vyujincuimsft_4-1658742709998.png

vyujincuimsft_5-1658742829061.png

Result Screenshot:

vyujincuimsft_1-1658742402542.png

 

 

Best Regards,
Charlie Choi

View solution in original post

Dear Charlie,

here is what I came up with:

 

My Excel:

Thatsme_0-1659422525822.png

 

My List:

Thatsme_1-1659422588053.png

My flow:

Thatsme_2-1659422766494.png

The trick now was the condition for the Switch:

Thatsme_3-1659422935434.png

 

So I just need one cycle of "apply to each" and can use the switch directly to determine change, new or delete.

View solution in original post

3 REPLIES 3
v-yujincui-msft
Community Support
Community Support

Hi @Thatsme ,

 

I have made a simple test for your reference.

 

1. Here is my list and excel table.

vyujincuimsft_0-1658741818772.png

2. Here is my Flow.

vyujincuimsft_2-1658742495802.png

vyujincuimsft_3-1658742622612.png

vyujincuimsft_4-1658742709998.png

vyujincuimsft_5-1658742829061.png

Result Screenshot:

vyujincuimsft_1-1658742402542.png

 

 

Best Regards,
Charlie Choi

Dear Charlie,

that sounds like an intriguing solution! One question though: In the first "apply to each" you are getting the unique ID to be used in the second "apply to each". But how exactly does that work with "get items" and then filtering for the unique ID? It first gets the ID and then takes that ID to cycle through the item update?

 

Will show my solution in a separate post.

 

Thanks a lot!

Christoph

Dear Charlie,

here is what I came up with:

 

My Excel:

Thatsme_0-1659422525822.png

 

My List:

Thatsme_1-1659422588053.png

My flow:

Thatsme_2-1659422766494.png

The trick now was the condition for the Switch:

Thatsme_3-1659422935434.png

 

So I just need one cycle of "apply to each" and can use the switch directly to determine change, new or delete.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,045)