I was trying to do something like that, but couldn’t get it to work. That looks like it should do the trick.