Simplicio,
This is a good approach since you want to allow the data to stand on its own, regardless of the client being used. I have answered with a user defined function on this thread that I am using in one of my apps.
-R!
Ricardo A. Parodi
eSolar, Inc.