I took a look in the forums for a solution and found this topic. There is an example by @danro of how to accomplish what you are looking to do. You will need to tailor it to your purposes.
I took a look in the forums for a solution and found this topic. There is an example by @danro of how to accomplish what you are looking to do. You will need to tailor it to your purposes.