I have two lists: Activities, Claims.
For each activity record, there can be multiple claims. I created a form in PowerApps that will push data to both lists as well as create a ClaimCount field in the Activity List. The ID field in the Activities list is pushed to the Claims list and stored as ActivityID so they can be linked together for reporting.
Here is my question.... I need someway to update the ClaimCount field in the Activity List when a claim is deleted from the Claims list. I start my Flow with 'When an item is deleted' and I was hoping to get the ActivityID from that record, but I'm very limited with the fields I can use from that section. I can only really get the ID of the claim, which isn't tied to the Activity at all, so no help there.
Any help doing something like this? Thanks in advance
Thanks for the replies. I actually ended up going about this another way.
I created basically a clone of my Claims list that I titled, 'Claim Verification'. Every time a new record is added to the original Claims list, a duplicate item is created in this new list with the common fields that links it all together (ClaimID, ActivityID, Claim Number). Since I can get the ID of the item that was deleted, I use that as the lookup value in this new list. Essentially, Claims.ID=ClaimVerfication.ClaimID. This way I can get all the details needed to update whichever list is needed.
@Anonymous
How about this:
1. Add a yes/no column to the claims list called DeleteMe
2. In PowerApps, instead of deleting the claim, update it by setting DeleteMe to true
3. Have a Flow that runs on new and change on the claims list that updates the related activities list item if DeleteMe is set to true and then deletes the current item in DeleteMe.
If this works for you, please mark your post as Solved.
Scott
Hi @Anonymous,
Yes, as you said, you couldn't get the value of ActivityID from the trigger "When an item is deleted".
One alternative way for your referance:
Push the ID field in the Activities list to the Claims list and stored as Title and ActivityID field, You could get the "Name" dynamic content of trigger "When an item is deleted", and the Value of "Name" dynamic content would be same with the Title.
Best regards,
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
WarrenBelz
146,635
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional