Update Global Variable on record delete

Update Global Variable on record delete

Hi,

Is it possible to run a script when a record is deleted from a view using the built in 'Delete' link?  As far as I can see there isn't but I would be happy if somebody told me I was wrong.  When users add a new record to a  Event attendance form they have to state how many people will be attending (input.No_attending). The number attending is added to 'Global variable' AttendeesTotal (function) to give me a running total of how many people will be attending.  If an attendee confirmed they couldn't come and I had to delete their record, I want to update the AttendeesTotal variable to reflect this. I could set up a custome action in my view to delete the selected record and then update the AttendeesTotal variable but its not ideal as the in-built delete link is still visible and administrators may use this in error and the global variable would not be updated.  Are these all my options?

Johnny