Project and Portfolio Management Practitioners Forum
cancel

Set Request Token from Package

Highlighted
Tommy Honahan
Trusted Contributor.

Set Request Token from Package

Hi All,

How can I set a request token from my package (object type)?

Meaning... I can grab the parent request ID of the package using the [PKG.PARENT_REQUEST_ID] token... so I basically want to do:

ksc_store [PKG.PARENT_REQUEST_ID].[P.P_REQ_TOKEN]="YES"

Is there anyway I can do this?

Thanks!
6 REPLIES
Erik Cole
Acclaimed Contributor.

Re: Set Request Token from Package

Just a guess, but maybe

[REQ="[PKG.PARENT_REQUEST_ID]".P.P_REQ_TOKEN]="YES"
Tommy Honahan
Trusted Contributor.

Re: Set Request Token from Package

I tried

[REQ="[PKG.PARENT_REQUEST_ID]".P.P_REQ_TOKEN]

as well as

[REQ."[PKG.PARENT_REQUEST_ID]".P.P_REQ_TOKEN]

But neither worked :-(
Erik Cole
Acclaimed Contributor.

Re: Set Request Token from Package

Maybe try an echo statement with the tokens so you can see which part is not resolving?
Erik Cole
Acclaimed Contributor.

Re: Set Request Token from Package

Also, are you referring to a Request (header) token or a Request Detail ([REQD]) token?
Tommy Honahan
Trusted Contributor.

Re: Set Request Token from Package

Hey Erik,

I think the problem is I can only use the REQ= functionality to pull a value, but not set it. When I do:


ksc_store [REQ="[PKG.PARENT_REQUEST_ID]".P.QC_ID]="1234"

The error is:

12345="1234", "1234"
ERROR while setting token.
The token attempting to be stored is invalid. Please verify that the token name is correct. (KNTA-10234)

So it's replacing the Token with the actual value... so I also tried:

ksc_store REQ="[PKG.PARENT_REQUEST_ID]".P.QC_ID="1234"

Then the error is:

REQ="30412".P.QC_ID="1234", "30412".P.QC_ID="1234"
ERROR while setting token.
The token attempting to be stored is invalid. Please verify that the token name is correct. (KNTA-10234)

This time it thinks REQ is the token name since it has an = sign after it.

I don't know what to do... but I really need to pass a value from my package to my request.

I also tried doing the opposite... pulling the value from the package on the request side... so I would do something like:

[PKG="XXXXXX".P.UD.P_PKG_TOKEN]

... in one of my request commands. But there is no token to replace "XXXXX" - which would be the package which the request has a reference too.



Erik Cole
Acclaimed Contributor.

Re: Set Request Token from Package

One more thing to try:

ksc_store REQ="[PKG.PARENT_REQUEST_ID]".P.QC_ID="1234","1234"

Sorry I don't have access to test anything myself right now...