Computed activity fields

Found a better script from David: