That code will toggle the data field you have selected. I'm not sure how that differs from what you want?