I was trying to get something like this to work but was failing. Thanks.