Project and Portfolio Management Practitioners Forum
cancel

Set a value from an execution step using a special command

Highlighted
john toomey_1
New Member.

Set a value from an execution step using a special command

I am trying to set a value in a field using an execution step. But when I use ksc_set, it fails to do the insert. The syntax looks right but the command doesn't work. Does anyone know how to fix this?
ksc_set APPLICATION_LIFECYCLE_STATUS="FULLY_RETIRED", "Fully Retired"
11 REPLIES
Mahen M
Acclaimed Contributor.

Re: Set a value from an execution step using a special command

ksc_store REQ.P.APPLICATION_LIFECYCLE_STATUS = ="FULLY_RETIRED", "Fully Retired"

If the field is in Header, Use the above command.

ksc_store REQD.P.APPLICATION_LIFECYCLE_STATUS = ="FULLY_RETIRED", "Fully Retired"

If the field is in Detail use the above command.

This works for me.

If this does not work, Kindly let me know, we can write the Parameter and Visible_Parameter inside ksc_store seperately.

Regards,
Mahendran M
Nisha Kurien
Honored Contributor.

Re: Set a value from an execution step using a special command

We wanted to set the value of the OOTB Description field. We tried using ksc_set and ksc_store only to learn that there is a restriction in trying to set OOTB header fields.

As a workaround, we created a function with a simple Update statement and called this in an execution step.

So the Execution Step is set to be of type PL/SQL Function. We call in the function and pass the request_id and parameter's value we want the Description field to be set to.

Remember to return a 'SUCCESS' and 'FAILURE' from the function for it to work in PPM.

- Nisha
Mahen M
Acclaimed Contributor.

Re: Set a value from an execution step using a special command

Yes you are right... the ksc_set or store does not work for OOTB Fields... I am not sure 'APPLICATION_LIFECYCLE_STATUS' is a OOTB Field token.

Regards,
Mahendran M
Jason Nichols K
Acclaimed Contributor.

Re: Set a value from an execution step using a special command

Mahendran is right, APPLICATION_LIFECYCLE_STATUS is not an OOTB field, so ksc_store REQD.P.APPLICATION_LIFECYCLE_STATUS="FULLY_RETIRED","Fully Retired" would be the way to go. Of course, if the field is in the header, use REQ.P.APPLICATION_LIFECYCLE_STATUS
Michael.Ebert
Super Contributor.

Re: Set a value from an execution step using a special command

Hi Nisha

because the description field is not one of the parameter fields I would have tried the following syntax

ksc_store REQ.DESCRIPTION="FULLY_RETIRED", "Fully Retired"

But haven't tried it by myself

Kind Regards,
Michael
Mahen M
Acclaimed Contributor.

Re: Set a value from an execution step using a special command

I think for description we cannot use the ksc_store or ksc_set, moreover, Description has only one field, There is nothing like Parameter and visible parameter for description.

Regards,
Mahendran M
Bobby M
Trusted Contributor.

Re: Set a value from an execution step using a special command

Hi,

For OOTB fields also we can use ksc_store.

For eg:
In Header Fields
1) ksc_store REQ.P.ERR_MSG="Error" -->Custom field in header(validation is text field).
2) ksc_store REQ.DESCRIPTION="HP PPM" -->OOTB field description(validation is text field).

In Detail fields
1) ksc_store BUDGET_CODE="61128"--> custom field.

The above settings are working fine for me.

Thanks
Bobby
Nisha Kurien
Honored Contributor.

Re: Set a value from an execution step using a special command

It could be a difference in the PPM version. I've tried various combinations using ksc_store and the DESCRIPTION token - example

ksc_store REQ.DESCRIPTION="text here"

in PPM 7.5 and it didn't work for me.

So we had to resort to creating a function.
Bobby M
Trusted Contributor.

Re: Set a value from an execution step using a special command

Hi,

We are on PPM 7.5 & SP3.
See the configuration of fields in attachment.
1) Proposal Description--> OOTB Description
2) Budget Code--> Custom field in Details Section
3) Error Message-->Custom field in Header Section.

Thanks
Bobby
john toomey_1
New Member.

Re: Set a value from an execution step using a special command

This line worked perfectly:
ksc_store REQ.P.APPLICATION_LIFECYCLE_STATUS = ="FULLY_RETIRED", "Fully Retired"


However, it goes to a close step. When it goes to the step, the previous status is displayed, but the graphical view shows that the request is closed. when you refresh the page, the request is then closed. How come it doesn't go right to 'closed'?
Mahen M
Acclaimed Contributor.

Re: Set a value from an execution step using a special command

Can you kindly share the snap of Execution step?

I hope the execution step 'Page Response' is set to 'Display the Request page immediately while execution is still Running'

Change it to the other option as shown in snap.

Regards,
Mahendran M