Project and Portfolio Management Practitioners Forum
cancel

Field Dependency on Request Token

Highlighted
Tommy Honahan
Trusted Contributor.

Field Dependency on Request Token

I'm trying to set the Display Only dependency for an object type field based on the value of a field in the Request tied to the package.

This can't be done easily since I can only select other fields within the object type... so I was thinking all I would need to do is create a new display only field, which would just pull the value from the request ([REQ.P.VERSION_LOCKED]) - but I can't seem to figure out how to do this.

How would I go about populating a Object Type field by pulling the value grom a Request field?

Thanks!
6 REPLIES
Mahen M
Acclaimed Contributor.

Re: Field Dependency on Request Token

You can write a rule, and in the Rule you can fetch the values by means of a SQL Query. I am answering in a generalized way, I am not sure about your exact requirement.

Regards,
Mahendran M
Tommy Honahan
Trusted Contributor.

Re: Field Dependency on Request Token

Here's my requirement:

I have a field in my object type called P_VERSION_LOCKED.

I want to set the value of this field with the same value which is selected in the request field REQD.P.VERSION_LOCKED

So, when the user creates a request, then the package, when they add each object line, it pulls the value from the REQD.P.VERSION_LOCKED field
Volker Schoettn
Honored Contributor.

Re: Field Dependency on Request Token

Hi,

The trick is to get the request id of the linked request.

I'm not sure if it work within a object type but try this:
[REQD="[PKG.PARENT_REQUEST_ID]".P_VERSION_LOCKED]

However the syntax in general should work.
Maybe a other token instead of the [PKG.PARENT_REQUEST_ID] is needed.

Hope it works

Regards
Volker
Tommy Honahan
Trusted Contributor.

Re: Field Dependency on Request Token

Where exactly would the statement

[REQD="[PKG.PARENT_REQUEST_ID]".P_VERSION_LOCKED]

go though?

This is something that would need to be run when the user is creating/editing the package line, not when the object is being deployed... so I can't put that in the object type command... I'm thinking it would have to go in a validation... but how do I create a validation that automatically sets the value?
Devin Rosenbaue
Frequent Contributor.

Re: Field Dependency on Request Token

I'm not sure that there's a way to automatically do this, but you could probably create a validation that has something like:

select '[that token]', '[same token]' from dual

That way there's only one option in the validation for the user to select, and it's the option he SHOULD select.

Is there some user-related reason that you need to do this when the Object Type is populated rather than in an early workflow step?
Tommy Honahan
Trusted Contributor.

Re: Field Dependency on Request Token

I thought of the validation approach - what what type of validation would it be?

The reason I'm doing it is because I have the Version Number field for all my object types are set to Display Only: Always so that the developers can't change the version number of an object after they have submitted their package.

But, for the next phase of testing I'm going to give them the ability to update the versions of their objects in their existing packages (rather then creating a new package) - so rather then editing the object type definition and allowing ALL objects to have the version number editable, I want to set this permission at the package level, not object type level.

To do so, I want to have the Migration team set a flag on the request: this flag will then be populate the package line token (which is what this post is about). Then, the Display Only property will be dependent on what the value of the flag is.