Project and Portfolio Management Practitioners Forum
cancel

Token reference in validation

Highlighted
Anthony Bachrac
Valued Contributor.

Token reference in validation

Has anyone been able reference a request token in a validation? We're trying to crate a validaiton that pulls the value of a previous field, can it be done?
5 REPLIES
Darshan Bavisi
Outstanding Contributor.

Re: Token reference in validation

Hi Anthony,

This is sure possible. You can use Rules for that. Create a rule in the request type as below,

1. In the 'Rule Event' field select 'Apply on Field Change'.

2. In the Dependencies section select the previous field that you mentioned.

3. In the 'Results' section select the field where you want to put the previous field value to.

4. In the SQL section, enter the sql similar to this,

select [REQD.P.DURATION], [REQD.VP.DURATION] from dual

You will need to replace the [REQD.VP.DURATION] with the token of the previous field that you mentioned.

Once this is done, you may want to make the destination field read-only if you do not want the users to modify the content of that field.

Does this resolve or is the requirement something different?
Darshan Bavisi
Outstanding Contributor.

Re: Token reference in validation

*I mean you will need to replace both the tokens,

[REQD.P.DURATION] and [REQD.VP.DURATION]
Darshan Bavisi
Outstanding Contributor.

Re: Token reference in validation

Again forgot to mention this point to make it work,

1. The destination field either should be a text-field

or

2. The values in the destination field (e.g. drop-down list) must match with the values in the previous field for it to work.
Anthony Bachrac
Valued Contributor.

Re: Token reference in validation

I've created rules that reference request tokens, but I'm trying to create a validation that references a request token. Reason being, as I'm sure you're aware you can't key a rule off of another rule. This may be a way around one of PPM's limitations.
Tim Brandish
Honored Contributor.

Re: Token reference in validation

My guess from what you're saying is that you want the field to auto-populate based on another request token. I think the best you can do is populate the results of an auto-complete using a validation that contains other request tokens such as this example.

select '[REQD.VP.TEST1]', '[REQD.VP.TEST1]' from dual
UNION
select '[REQD.VP.TEST2]', '[REQD.VP.TEST2]' from dual

If you give a little more detail about what it is you're trying to accomplish, we can probably come up with a workaround.