How to get comments from an approved approval record to a field on an RITM ticket

stevezempke
Tera Contributor

on an RITM ticket, I have two approval stops, one is the manager of the requestor and one is for our security team.  The mgr approval is a one approver and the security team has 3 approvers of which only 1 needs to approve.

 

the objective is to show the manager approval in an approval comments box on the RITM and the security approval appended to the approval comments box on the RITM.  it doesn't matter if a comment is written or not from an approver but to show the requestor, or anyone else, who approved the RITM.

 

to do this i have a 'Run Script' in my workflow to write the contents of the comment field, blank or not blank, to the RITM after each approval stop.

for the manager, the 'Run Script' is the below and works just fine, if there is a comment entered from the manager or not

stevezempke_0-1667233919624.png

 

once the manager approvers, the workflow goes to the security team to approve, there are 3 members of the team and only 1 need to approve/reject to move the ticket.  below is the code in the 'Run Script' after their approval stop.

stevezempke_1-1667233989194.png

 

i've played with this 'Run Script' for many hours trying to get it work in this scenario.

if the manager approves, but adds no comment, the Approval Status, Approver and Approval Comments appear in the RITM field.  Now, the comments field is blank which is okay

when it comes time for the security team, to approve, i can approve for them, and add a comment, and save and the field on the RITM shows a duplicate of the manager approval and not the security person who approved.

 

so my question is how can I get the security approval to show on the RITM instead of a duplicate of the manager approval.  

 

thanks in advance for any coding suggestions or updates.

 

Steve

 

 

2 REPLIES 2

Radhika Aluru
Tera Guru

HI Steve

 

you can make use of Approval History field that is present in the RITM table to show Approval details which has comments also.

Thanks Radhika.  How would I update my existing code to look at the approval history field and to look at the specific ticket that is being approved?