------------- Vendor Contract Maintenance --- CN.SUB.00 (Subcontract Maintenance)
Custom User field Object as xuser1 (Bound to pjsubcon.user1)
PV Property: "CT_SubProject_List", (Matching Query and proc below)
-------------PVRec Query Line ----------------------------
"CT_SubProject_List","","","select Distinct Project, Project_Desc, Purchase_order_Num, user2 As Parent from PJPROJ where user2 = @parm1 order by project","Sub Projects","PJPROJ.project;Project #;0;0","PJPROJ.project_desc;Description;0;0","PJPROJ.purchase_order_num;CIP Number;0;purchase_order_num","PJPROJ.user2;Parent Project;0;0"
------------Matching SQL Procedure -----------------------
ALTER Procedure [dbo].[CT_SubProject_List] @parm1 varchar (16) AS
select Distinct Project, Project_Desc, Purchase_order_Num, user2 As Parent from PJPROJ where user2 = @parm1
order by project
----------------------------------------------------------
Field PJProj.user2 is used as the Sub Project field in the PJProj Table establishing a Parent Child relationship.
We Need @parm1 to be passed as the parent project (referenced On Screen as pjsubcon.project), then the SQL Procedure will return the Sub Projects (Children) as Possible values
The SQL Procedure has been tested separately and will return the correct dataset when a project is passed in.