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

Creating non duplicate items in sharepoint

Hi All,


Currently, i am trying to build a flow that extracts ID from an email body and store it in sharepoint. I am able to extract the ID from email body and also create an item. 
but i am stuck at one place, i want to check if the item which i am creating is not duplicate. if it is duplicate i do not want to create it, i just want to terminate my flow. 
So, currently i have 2 items in my list, my flow checks both the item ID and creates an item in my list as it finds that the first item had a different ID.
i want my flow to first check all the IDs and if it does not find the ID in the array then create an item, if it finds it terminate the flow.
below is the screenshot of my flow. Please do help me out if anyone knows the solution. 
Thanks.
image.png
 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Anonymous 

 

What's wrong with your current logic?  What happens when the flow is running? I can see there is a condition checking the title. You might need a single quotes around the value you are checking. 

 

Also you could use the Filter to check the title directly from the Get Items action itself then check the count to determine if the record already exists or not?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

3 REPLIES 3
abm
Super User
Super User

Hi @Anonymous 

 

What's wrong with your current logic?  What happens when the flow is running? I can see there is a condition checking the title. You might need a single quotes around the value you are checking. 

 

Also you could use the Filter to check the title directly from the Get Items action itself then check the count to determine if the record already exists or not?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

@abm with the current logic the flow runs successfully however, it checks both the items and where it does not match the title it creates an item. However,i want to check all the items before creating an item in my list.

 

The second option sounds feasible, how do i check for the count in the condition for get items. Could you help me out on this?

 

v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

The first thing to note is that ID is metadata that is automatically generated when the item is created. We cannot modify this, and it is the most critical value for specifying the item.

If you can get the item id from the email body, it seems that this item with the corresponding ID already exists.

 

Even if you don't judge, you can't create an item with the same ID, because the ID is unique.

 

Anyway, if you want to rely on the ID you extracted to see if the corresponding item exists, you could consider the following methods:

99.PNG

 

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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 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.

Users online (4,865)