I added the UDF to my script to run first but I am not sure what needs to be changed to conform to my domain. So the syntax is correct.