This is an interesting general question as well about KiXtart supporting OUT parameters in functions, but if I can't get a native KiXtart solution I'll just call a vbscript to get that part done and move on.