@Phrendo - Thanks for this post. I was struggling with the same issue yesterday and now I have the script working.