I read through the udf faq and still don't see the problem with the code.
Has anyone else been able to get something like this to work?