You'd have to write code; nothing is built in to do this.