Skeleton that correctly observes the event and inserts/updates rows in a custom table.