Project and Portfolio Management Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

COPY fields to new Request Type with different TOKEN names

Raj Ghimire
Occasional Visitor

COPY fields to new Request Type with different TOKEN names


I was trying to auto-create a new type Request from one Request Workflow by copying some fields of existing request using ksc_copy_request FROM_REQUEST_ID="[REQ.REQUEST_ID]" REQUEST_TYPE_ID="30297" WORKFLOW_ID="30729" COPY_FIELDS="Y" COPY_NOTES="N" CREATE_REFERENCE="Y" REFERENCE_RELATIONSHIP="Child of this Request" SUBMIT="Y".

My problem is: most of the fields that I want to copy over have different TOKEN names in two reqeust types. So, the above command isn't quite helping me. Its been a while but I remember seeing an execution command buit using KCRT_REQUEST_UTIL package in 5.5 which was used to accomplish this but I am getting lost :smileysad:
Can anyone give me a tip. Would really appreciate it !



Honored Contributor

Re: COPY fields to new Request Type with different TOKEN names

Well you can user "copy_request" procedure within the "kcrt_request_util" package. 


In previous version HP  has provided the functionality to copy uncommon tokens using the VALIDATION. In currently script also it has been written in commnets that..


--  -- Purpose: Create a new request of type p_request_type_name. 

--          Some values are defaulted from the request p_from_request_id. 

--          The values that needs to be defaulted are stored in 

--          p_validation_name validation.  This validation uses 

--          code and meaning to provide source token and dest token. 

--  -- -----------  --------  ---------------------------------------------------- 


But in whole script I cannot find p_validation_name variable... :smileywink:



So in my case, we have created a function to copy the desired fields from its parent request after the child request is created.

Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Raj Ghimire
Occasional Visitor

Re: COPY fields to new Request Type with different TOKEN names

Thanks Utkarsh. In fact I am kind of  facing similar confusion regarding "p_validation_name" .

If i remember correctly, this procedure used to be much simpler in earlier version but in our current 7.5 version, "copy_request" procedure within the "kcrt_request_util" package seems a little confusing and I just am not able to figure out how to utilize the prodedure to copy the desired fields values with uncommon token names between them.

I was thinking about that additional step in Child request WF too but that one is a very critical type of request type and we very rarely get approval for any changes there so I was hoping to get one created without touching that WF. 

Wonder if anyone else would have any additional suggestions.

Thanks in advance.


//Add this to "OnDomLoad" event