AME: Need help with an attribute
Requirement is to create a purchase requisition approval rule which check the condition if project exists on the requisition. I haven't been able to setup the custom attribute which checks if project exists on the line. When I set up below query it only works when I have one line but errors out when I have two lines.
SELECT Decode(Count(prd.project_id), 0, 'false', 'true')
FROM po_requisition_headers_all prh,
po_requisition_lines_all prl,
po_req_distributions_all prd
WHERE prh.requisition_header_id = prl.requisition_header_id
AND prd.requisition_line_id=prl.requisition_line_id