cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Item not found when an item is deleted

I want to delete an item from a list. I need to store a value from the deleted item to use it for calculation in another list.

 

I use action "when an item is deleted", then the next step is "Get Item".

Capture11.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


However I get the following error message:

Capture12.PNG

 

 

 

 

 

 

 

Capture13.PNG

 

 

 

 

 

 

 

 

 

 

 

Regards,

Deddy.

3 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hi @deddyandy 

 

The action Get Items only works for items that are present in the SP list when that action is executed so you cannot really get the item that way. jsklfdj.PNG

 

Here i am sending the ID details and the title and the person who deleted the item in an email. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hi @deddyandy 

 

So how this works is, the Get Item action is an independent action that will be executed. For the trigger: When an item is deleted, this is triggered when the item is deleted and the trigger itself brings some data as I have shown in the previous resposne. Similarly, for the When an item is created or modified, you get the Id from here and now the Get Item action runs and makes a new call to SP to get that particular item referenced here. So that way, on the When an item is deleted will not work as the item doe not exists when the get item is being executed. Makes sense?

 

Can you share the scenario that you are trying to build so that I can have a better look and suggest a possible solution? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS! 

View solution in original post

Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hey @deddyandy 

 

There is a limitation on this one. So when an item is deleted is triggered, you can just get the name, ID etc and not any of the columns associated with that item. So this way, it would not be possible to get the other list to update when an item is deleted from List A. 

 

You might want to create workflow in SP itself to achieve this. Here is a post that shows how to do that:

https://stackoverflow.com/questions/16295567/how-to-create-calculated-column-with-data-from-another-...

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

7 REPLIES 7
Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hi @deddyandy 

 

The action Get Items only works for items that are present in the SP list when that action is executed so you cannot really get the item that way. jsklfdj.PNG

 

Here i am sending the ID details and the title and the person who deleted the item in an email. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Helper II
Helper II

Re: Item not found when an item is deleted

Hi @yashag2255,

 

So I guess it is different from action "when an item is created or modified" where we can access all information in an item.

 

Could you please tell me of how to solve my need?

 

Regards,

Deddy.

Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hi @deddyandy 

 

So how this works is, the Get Item action is an independent action that will be executed. For the trigger: When an item is deleted, this is triggered when the item is deleted and the trigger itself brings some data as I have shown in the previous resposne. Similarly, for the When an item is created or modified, you get the Id from here and now the Get Item action runs and makes a new call to SP to get that particular item referenced here. So that way, on the When an item is deleted will not work as the item doe not exists when the get item is being executed. Makes sense?

 

Can you share the scenario that you are trying to build so that I can have a better look and suggest a possible solution? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS! 

View solution in original post

Highlighted
Helper II
Helper II

Re: Item not found when an item is deleted

Hi @yashag2255 ,

 

It does make sense now. Thanks for the explanation.

 

The scenario is that I have two lists, say List A and List B.

List A has a column named Allotment, numeric type.

List B has a column named AmountOfFieldLeave, numeric type.

 

When an item is deleted from List A, the value in column AmountOfFieldLeave in List B must be deducted by the value of column Allotment of the deleted item.

 

To make it more clear please find the following lists (the lists do not show the whole tables)

 

Capture-1.PNG

 

 

 

 

List A

 

Capture-2.PNG

 

 

 

 

 

 

List B

 

List B is the summary of data in List A. When I delete the record "Deddy Andy        5" from List A, then the corresponding record in List B must change from "Deddy Andy       7" to "Deddy Andy       2".

 

Appreciate for your help.

 

Regards,

Deddy

Highlighted
Dual Super User III
Dual Super User III

Re: Item not found when an item is deleted

Hey @deddyandy 

 

There is a limitation on this one. So when an item is deleted is triggered, you can just get the name, ID etc and not any of the columns associated with that item. So this way, it would not be possible to get the other list to update when an item is deleted from List A. 

 

You might want to create workflow in SP itself to achieve this. Here is a post that shows how to do that:

https://stackoverflow.com/questions/16295567/how-to-create-calculated-column-with-data-from-another-...

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Helper II
Helper II

Re: Item not found when an item is deleted

Hi @yashag2255,

 

I have regretted stopping using SharePoint Designer, and starting using Flow 3 years ago. Flow was launched with many basic weaknesses. I am also having another problem with action "when an item is created or modified" where it causes flow run indefinitely. I have forgotten most of SharePoint Designer because I was also a beginner at that time and only using it for one year. Now I have to start learning it again.

 

Anyway, thanks a alot for your help.

 

Regards,

Deddy.

Highlighted
Regular Visitor

Re: Item not found when an item is deleted

@deddyandy  i've been struggling with this also but I managed to find a way to do this and keep things automated. You have probably solved your problem by now... but here is what I did:

 

1. in my sharepoint list a created a calculated column to get any info from other columns that I would need if i deleted it and used a very distinctive separator which will come in handy later in flow, something like "*-%" & [field1] & "*-%" & [field2] & ... "*-%" & [fieldx].

2. I set up the "alert me" option on the list for when an item is deleted.

3. I set up a rule in Office 365 to move all emails from sharepoint with the name of my list in the subject (alert me includes the list name in the subject)

4. I created a flow that gets triggered when an email arrives in this folder.

5. in my flow i use html to text to get the body of the email and then i pass this to an array variable. 

split(body('Html_to_text'),'*-%*')
6. from the array variable I easily get all the fields ignoring [0] and the last item, variables('recoveryInfo')[1]
finally i just perform the actions i need that need these deleted values 😀

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,597)