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

Update Sharepoint List From Excel only if a value does not exist in Sharepoint

Hi,

 

Our ERP exports client bills to an Excel Sheet. We want to feed the Excel Sheet to a SharePoint list so that client can check their accounts on SharePoint.

 

I need help creating the following logic:

1. Read Excel Table from SharePoint Document (done without problems)

2. If a bill is already in the SharePoint List, move to next bill number in Excel

3. if a bill is NOT in the SharePoint List, add the bill to SharePoint List.

 

Thanks in advance for your support & time.

 

RTAHA

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage
Solution Sage

Hi RTAHA,

According to your request, I have made a flow for your scenario, please check it for a reference.

1 For the first step, I'm using a Manually trigger, you can choice other trigger as you want.

2 The next step is List rows present in a table, here you can get the data from the excel file in SP library.

3 The next step is get items where you want the Excel Sheet export to.

4 Next is Initialize variable and Append to array variable, to insert the bills from the list in the array.

5 Next is Filter array to filter the bills from excel which not in the list.

6 Last Create item.

And the expression below: item()?['account']   item()?['bills']

1.png

Inked2_LI.jpg

 

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

5 REPLIES 5
Solution Sage
Solution Sage

Hi RTAHA,

According to your request, I have made a flow for your scenario, please check it for a reference.

1 For the first step, I'm using a Manually trigger, you can choice other trigger as you want.

2 The next step is List rows present in a table, here you can get the data from the excel file in SP library.

3 The next step is get items where you want the Excel Sheet export to.

4 Next is Initialize variable and Append to array variable, to insert the bills from the list in the array.

5 Next is Filter array to filter the bills from excel which not in the list.

6 Last Create item.

And the expression below: item()?['account']   item()?['bills']

1.png

Inked2_LI.jpg

 

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

Hi Zhonys,

 

Thank you for your help. I will test soon.

 

You flow looks more optimized. Smiley Very Happy Here is the flow I am experimenting with at the moment:

 

flow part 1.jpg

 

flow part 2.jpg

 

 

 

 

 

Hi,

I have a table with 12 columns which need to be exported to Sharepoint List.

With exactly same functions discussed in thread (i.e. Create item only if the item does not exist in Sharepoint list)

Can you please help? I am struggling since few weeks now.

Hi,

I have a table with 12 columns which need to be exported to Sharepoint List.

With exactly same functions discussed in thread (i.e. Create item only if the item does not exist in Sharepoint list)

Can you please help? I am struggling since few weeks now.

Hello @v-zhos-msft ,

I'm trying something similar to this flow that you posted.  

 

This works perfectly during the first run, however during the second run the List rows present in a table step fails because the Table Name has been changed and I receive the following error. 

No table was found with the name '{E5853258-8B64-4462-AB0C-A3E20225A269}'.
clientRequestId: 138b4399-c238-45e4-ad81-392966f40e92
serviceRequestId: 41586a4c-0adc-4e59-b650-60373138f895

Have you ever experienced anything like this before? 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (10,661)