I've actually been struggling with this. Wasn't sure how to do it..having to remember that state value was a headache. This solution is exactly what I needed. Thanks!