fatherofthree
MIS
The loan operating system we use has an oracle background. We are able to create business rules to control how things work in the system.
I am trying to create a rule which will update 5 fields in a table based on the value of a certain field in another table. The primary key of both tables is the AP_NUM. Unfortunately, the code updates the 5 fields on every account no matter what the value is in a certain field. Below is the code:
"SHIP is the table the 5 fields are in"
"T is the table where the criteria field exists"
"CONDO is the criteria for T.PROPERTY_TYPE"
"The statement T.AP_NUM =:FORMNAME.cmbApNum is a required statement for the loan operating system which basically means the ApNum on the active screen equals the value in T.AP_NUM"
Result:
SHIP.DETACHED_HOUSE is set to 0 for every account no matter what the value of T.PROPERTY_TYPE.
I guess I am missing something. HELP
I am trying to create a rule which will update 5 fields in a table based on the value of a certain field in another table. The primary key of both tables is the AP_NUM. Unfortunately, the code updates the 5 fields on every account no matter what the value is in a certain field. Below is the code:
"SHIP is the table the 5 fields are in"
"T is the table where the criteria field exists"
"CONDO is the criteria for T.PROPERTY_TYPE"
"The statement T.AP_NUM =:FORMNAME.cmbApNum is a required statement for the loan operating system which basically means the ApNum on the active screen equals the value in T.AP_NUM"
Code:
UPDATE SHIP SET SHIP.DETACHED_HOUSE = 0, SHIP.ATTACHED_HOUSE = 0, SHIP.PUD = 0, SHIP.CO_OP = 0,
SHIP.CONDO = 1 WHERE EXISTS (SELECT T.PROPERTY_TYPE FROM T WHERE T.PROPERTY_TYPE = 'CONDO' AND T.AP_NUM =:FORMNAME.cmbApNum)
Result:
SHIP.DETACHED_HOUSE is set to 0 for every account no matter what the value of T.PROPERTY_TYPE.
I guess I am missing something. HELP