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

Copy the value of Status in another Token

Highlighted
Islam Nofal
Regular Collector

Copy the value of Status in another Token

Hi,

 

I need to create a Token in a request type, so this token will always have the value of the Status field on the request, and whenever any change happens on the field status it should be reflected to the new token, how can this be achieved.

 

Thanks in advance,

Islam Nofal

3 REPLIES
blair_lacour
Acclaimed Contributor

Re: Copy the value of Status in another Token

A quick question first - what are the needs, why can't you just refer to the status field / token?  Why do you need to maintain another field that will have the same value?

 

To answer you question, the status change will be driven by moving in the workflow.  When you are moving in the workflow, you can use kStore in a command to populate the new field.  It would be best to use comands within the request - you could also put the comands in an execution step source.  Either approach will require execution steps every time you transition in the workflow.  With that said, this will get out of control if the workflow is complicated or at least hard on the eyes.  

 

Hope that helps

 

Cheers.  

Blair

Islam Nofal
Regular Collector

Re: Copy the value of Status in another Token

Hi Blair,

 

Thanks for your reply,

 

My issue is we have an integration between PPM and another application through web services, this integration operation mode enforces on the other application to change the status of the PPM Request in different stages, when i tried to change the status through web services, nothing was updated in the request, so what I got is the only way to change the request status is through the workflow steps.

 

so we thought we can create another field to work as Status, so that the other system can update it as well as when the status is changed by the PPM workflow, it will be changed in the new field.

 

for the workflow execution step, It's a good workaround but in such case each workflow step will be changed to two steps, one for decision and followed by an execution step, which will complicate the workflow in some how.

 

if you have any recommendations if we can do it through request types rules, it'll be great.

Utkarsh_Mishra
Honored Contributor

Re: Copy the value of Status in another Token

You can use

 

KSC_STORE <YOUR_TOKEN> = [REQ.STATUS_NAME],[REQ.STATUS_NAME]

 

Secondly as per your comment, you want to move the workflow to another step/status. You can use

 

ksc_move_request_workflow

 

command to move you workflow. Alternative to this is to use

KCRT_REQUEST_UTILS.move_request_workflow package to move your workflow.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event