cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Charles-v-D
Level: Powered On

quickest way to obtain the ID of a written sharepoint item

Hi All,

 

In my flow I use "create item" to write a line item in a SharePoint list. A couple of actions later I need to delete the same item. Therfore I like to obtain the unique ID of the item I have just written to store in a variable.. which I can then later use to set ODATA query in "get items" actions to obtain the item and delete it.....

 

So question is: How to obtain the ID of a created item?

 

Regards

Charles

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: quickest way to obtain the ID of a written sharepoint item

Actually, the ID of the Created ITEM will be returned by the Create an Item action.

You can then either store that in a variable or use it directly in a later action to delete the item.

 

You won't really need to store it in a variable and you can also use it in a Get Item action instead of using an Odata filter in Get Items.  But none of that is really necessary as you can see from the example FLOW below.

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Dual Super User
Dual Super User

Re: quickest way to obtain the ID of a written sharepoint item

Actually, the ID of the Created ITEM will be returned by the Create an Item action.

You can then either store that in a variable or use it directly in a later action to delete the item.

 

You won't really need to store it in a variable and you can also use it in a Get Item action instead of using an Odata filter in Get Items.  But none of that is really necessary as you can see from the example FLOW below.

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,301)