Thanks. I've found an alternative way of achieving what I wanted in the mean time.
I'll try your solution later.