cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to check if an item exists on a SharePoint list

Hello,

 

I can't figure out a way to take an Excel workbook and go through each row to see if it exists in a SharePoint list and if so update it, or if it doesn't create a new item.

 

I keep getting errora about for each loops about arrays, but I can't even think of a way to do a lookup of a SharePoint list to build a condition against. Get Item never shows dynamic content either... I am at total loss.

 

This output is an array. A foreach cannot be nested inside of another foreach.
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi Stvcdms,

 

Currently it is not possible to check if a file or an item exists in SharePoint List/Library. I have seen a similar request from another thread, please vote and comment the idea at here:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas/label-name/sharepoint%20file%20exists

 

PGs will take hot ideas into consideration, and I will suggest other customers who have the same request to vote the idea at here. I will also collect and report the request from my side.
Thanks for your understanding.

 

Best regards,
Mabel Mao

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

View solution in original post

6 REPLIES 6
v-yamao-msft
Community Support
Community Support

Hi Stvcdms,

 

Currently it is not possible to check if a file or an item exists in SharePoint List/Library. I have seen a similar request from another thread, please vote and comment the idea at here:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas/label-name/sharepoint%20file%20exists

 

PGs will take hot ideas into consideration, and I will suggest other customers who have the same request to vote the idea at here. I will also collect and report the request from my side.
Thanks for your understanding.

 

Best regards,
Mabel Mao

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

View solution in original post

Anonymous
Not applicable

Is there a away to look up an item in a SharePoint list from an Excel row?

Hi Stvcdms,

 

I am afraid it is not possible to look up an item in a SharePoint list from an Excel row.
What’s your scenario? Let me see if I have a workaround for this.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yamao-msft
Community Support
Community Support

Hi Stvcdms,

 

I have some updates for you.

 

I have seen a documentation about Workflow Definition Language, please check this link for more details:
https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

From this documentation, we know that we can use Empty function to return true if object, array or string is empty.

According to this, I created a flow to send an email when a column is empty. I configured the Condition in Advanced mode, please see below for more details:

1.png

 

This flow works fine on my side. Please try it on your side.


Best regards,
Mabel Mao

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

This workaround will help you if you can set up a criterion that uniquely matches 1 item (or none):

Initialize a Boolean variable to false; this variable should indicate whether the item you are looking for exists.

Then iterate over the items found using Get items and set the Boolean variable to true.

 

Check if SharePoint item exists.PNG

Sorry to be dense but is there an action called "Get items that match Criteria" or did you just rename "Get Items?" If latter can you elaborate, or give example, on setting Criteria?  

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,749)