Hi,
I am having troubles figuring out how to use the " When an item is deleted " trigger
There's an existing when an " item is created or modified " trigger that creates / updates an item in Sharepoint List B when Sharepoint List A is updated.
I would like deletion to be possible too. Sharepoint List B contains an extra column that has the "identifier" of the item from Sharepoint List A.
Problem is, there's no option for identifier in the dynamic content.
I also cannot use ID as an identifier because there's multiple flows running to update Sharepoint List B, not just Sharepoint List A.
Any recommendations/ easier way to get this done ?
Accessing the details of a deleted item from List A for comparison with List B directly is not possible. However, when an item is deleted, in the trigger's metadata, you can retrieve the deleted item's Title in the Name field and can't use id since it may vary another list. Utilizing this information, you can employ a "Get items" action and filter the results to match List B items with List A using a query like Title eq 'Name'.
Another workaround I can suggest is to add a flag named "DeleteItem Y/N." This involves introducing a new Choice column in List A, offering options for "Yes" and "No." This column acts as a marker, indicating whether an item should be deleted.
By implementing this approach, you can retrieve all column information in Dynamic content, compare it with another list, perform the necessary deletions, and finally remove the triggered item as well.
If this solution proves helpful and resolves your issue, kindly consider marking it as accepted. Doing so will aid others who encounter similar challenges in the future.
Regards,
Santhosh Balakrishnan
Apps4.Pro - Trusted Office365 T2T Migration partner. Migrate Exchange, SharePoint, Microsoft Teams, Stream, Yammer, Power Platform between tenants.
Product Specialist - http://www.apps4.pro/
Hi @txwmay ,
The ID column I am talking about is the ID column that comes with the list when it is created, not the ID column that you add manually later.
The ID column that comes with the list will not change as the list is updated, so it will not cause logical failures.
Here are the steps to display the ID column that comes with the list:
Best Regards,
Sunshine Gu
Hi Sunshine,
Thanks for your response.
Unfortunately for my case, Sharepoint List B is also updated by Sharepoint List C, D, E, and F.
Will using ID work ? There will probably be a logic breakdown cause each list needs to populate / update Sharepoint list B.
Let me know if you think otherwise.
Thanks a bunch!
Hi @txwmay ,
I suggest you use ID dynamic content as the matching condition, because no matter how you update the item in list B, the ID of the item itself will not change.
I did a test for your reference.
In my scenario:
Best Regards,
Sunshine Gu
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional