I kind of got it working yesterday, btu oly for the main projects. The subproject data is giving me fits due in main to cpid changes leaving orphaned data in the subproject table.

I may just implement it for main data only for now.