Project and Portfolio Management Practitioners Forum
cancel

Invalid Token

SOLVED
Go to solution
Highlighted
dasfweg
Super Collector

Invalid Token

Good morning,

This goes along with the Creating a SQL to check a field in a Request post i have sent on Friday. We have created a Workflow execution step to run the following:

SELECT CASE WHEN [REQ.P.P_OVERALL_TOTAL] < 250000 Then 'Yes' ELSE 'No' END, CASE WHEN [REQ.P.P_OVERALL_TOTAL] < 250000 Then 'Yes' ELSE 'No' END from dual.

Were getting an "Invalid Token" error.

Anybody know what i missed?

Here is some additional info:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 REPLIES
AlexSavencu
Honored Contributor

Re: Invalid Token

Hi,

 

I think that your problem comes from the fact that you want to return a token in the execution step - this is wrong. You should return on of the valid values behind the validation of the step source.

 

As previously mentioned, check this post: http://h30499.www3.hp.com/t5/Project-Portfolio-Management/Workflow-transition-dependent-on-two-field-values/m-p/5383983#M1582.

 

You will find an attachment with a very clear example.

 

cheers

alex


--remember to kudos people who helped solve your problem
Erik Cole
Honored Contributor

Re: Invalid Token

Hi,

Couple of thoughts...your token is referring to a field in the header. If this is okay, great, otherwise if it's a request detail token you need it to be REQD.P.*

Also just to be safe I would use

nvl('[REQ.P.P_OVERALL_TOTAL]',0)

to make sure you always have a valid sql statement:

 

SELECT CASE WHEN nvl('[REQ.P.P_OVERALL_TOTAL]',0) < 250000 Then 'YES' ELSE 'NO' END From Dual

 

Like Alex mentioned, you also want to make sure the sql returns a value that is one of the values for the CODE of the execution's validation values and it only needs to return one "field".

Optionally, you could use a hidden field and request type rules to populate it with a Yes or No value based on your two input fields, and just use a simple "token evaluation" execution to transition based on that field's value.

AlexSavencu
Honored Contributor
Solution

Re: Invalid Token

Hi, dasfweg,

 

did you solve the problem? If yes, then I think you should close the related threads...

 

cheers

alex


--remember to kudos people who helped solve your problem
dasfweg
Super Collector

Re: Invalid Token

Thanks everybody for your help we were able to come up with a solution from the info you have provided
//Add this to "OnDomLoad" event