I currently have a Flow set up in List A that creates an item in List B each time the item in List A is modified. List B uses the ID from the items in List A to group them together in List B using a new column that I have created called "Unique ID" which is populated from the ID column in List A (this part is working fine). List B is just a 'dumping ground' and will never manually have items created, modified or deleted. It is all done through Power Automate.
However I am struggling with the next part. If an item in List A gets deleted, I need the Flow to find all of the corresponding versions of that same item (using the Unique ID column) in List B and delete them in here as well. E.g. an item in List A (with the ID=4) has been modified five times, there will be five items in List B with the field "Unique ID=4". If this item, with ID=4 gets deleted in List A, I need all five items in List B with the Unique ID=4 to also be deleted.
Any help would be greatly appreciated.
@Sam12 - Are you using Lookup column in List B. The feature you are looking for is in built within SharePoint Lookup functionality. Pleas refer below section within lookup column definition...
Like and Mark this as answer if this resolves your issue.
Thanks @PrasadAthalye - however there are no lookup columns in List B. List B just contains Single Line of Text columns, and items in List B are created through Power Automate when items are created and modified in List A.
@Sam12 - I am requesting to define a lookup column in List B and while creating an item, populate it so that later you can use the feature that I mentioned. This way you can achieve what you are looking for.
Like and Mark this as answer if it resolves your issue.