Project and Portfolio Management Practitioners Forum
cancel

Comparing Tokens in Execution Step

Highlighted
b460
Super Contributor.

Comparing Tokens in Execution Step

Hi,

Within one of my workflow's I require that an execution step check 2 tokens to see if they contain the same data. For example, if the person in Token1 is the same as Token2.

I need the execution step to then return either a YES or NO result.

Is this possible to do this, and if so how?

Cheers.

8 REPLIES
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

select 'SUCCESS' "Result" from dual where (select nvl(Parameter1,'NULL') from PRODPITG.KCRT_Request_details where request_id=157224 and Batch_number=1 and Request_type_id=31258) = (select nvl(Parameter3,'NULL') from PRODPITG.KCRT_Request_details where request_id=157224 and Batch_number=1 and Request_type_id=31258)

union

select 'FAILURE' "Result" from dual where (select nvl(Parameter1,'NULL') from PRODPITG.KCRT_Request_details where request_id=157224 and Batch_number=1 and Request_type_id=31258) <> (select nvl(Parameter3,'NULL') from PRODPITG.KCRT_Request_details where request_id=157224 and Batch_number=1 and Request_type_id=31258)


--------------------------------
See if the above Query works.

Instead of Success and failure, Try to change the value to 'Yes' or 'No'

Regards,
Mahendran M
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

Workflow Scope = All
Execution Type = SQL Statement
Validation = WF - Standard Execution Results
Processing Type = Immediate.

Regards,
Mahendran M
b460
Super Contributor.

Re: Comparing Tokens in Execution Step

I dont think that will help.

The 2 tokens that I want to compare are in the same request.

So in the execution step all I want to do is:

IF [REQ.P.TOKEN1] = [REQ.P.TOKEN2]
THEN
RETURN yes
ELSE
RETURN no

I just do not know the logic on how to perform that in an execution step.
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

The values in 2 Tokens will get saved in DB no?

I request to compare the values in the Database parameters.... It will work perfectly fine.

We have this enabled in our system and it works without any issues.

You want to compare 2 values in the same request.... That is what I have done... Token or DB Parameter... at EOD you are comparing 2 values. I am not sure what is your concern. Kindly explain.

Thank you

Regards,
Mahendran M
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

Remove PRODPITG before the Table names, That is my schema name.

Regards,
Mahendran M
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

For finding the Parameter number, you have to open the Field in Request Header or Detail and go to a tab called 'Storage'(Given in the snap.)

Regards,
Mahendran M
Erik Cole
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

Maybe something like

Select Decode(Count(*),0,'NO','YES') From dual
where '[REQ.P.TOKEN1]' = '[REQ.P.TOKEN2]'
Mahen M
Acclaimed Contributor.

Re: Comparing Tokens in Execution Step

Perfect, Thank you.

Regards,
Mahendran M