I created a new AME rule such that if there is a job title change through the
Change Job or Transfer Function and the proposed job_id has the per_jobs.attribute12 DFF value of 'M5 or M6 then insert the Comp Manager as approver. I had to create a custom dynamic attribute called "Career Level" to fetch the proposed job's attribute12 values . Here is my sql -
This rule works fine when I do a manager sshr transaction that includes a job
change. However, if I do any other transactions that exclude job title changes such as Pay Change only, then I get the error: "The transaction ID specified returned an incorrect number of rows for CAREER LEVEL. Ensure you specify a valid transaction ID and the dynamic query of the attribute returns correct number of rows."
Pay Changes transactions were working fine before I implemented this rule.
Any thoughts on the error msg?
Maybe you have fixed this by now but it sounds like your AME rule is firing for every single SSHR transaction submitted.
It is more usual to add an extra Condition such as
if WORKFLOW_NAME = HR_CHANGE_JOB_JSP_PRC then true
and then combine that with your new attribute. In other words, only ever evaluate your attribute within the flows where it is important, not all flows.
I had a similar issue with a custom AME attribute. I resolved the issue by using an inline select script on the attribute. I needed to retrieve a value that existed on some Requisition Request Types but not all. The script provides the value if it exists and where it doesn't still returns a line.
Select (select pti.attribute_value
from por_template_info pti
where pti.attribute_code = 'IFT_100'
AND pti.requisition_line_id = prl.requisition_line_id)
from po_requisition_lines_all prl
where prl.requisition_header_id = :transactionId
I hope this helps you.