Request Rules (196 Views)
Reply
Occasional Contributor
Keli Hodnett
Posts: 6
Registered: ‎12-01-2010
Message 1 of 3 (196 Views)
Accepted Solution

Request Rules

I have for different rules set up based on a request field. The request field dependency is the same for all four rules, the results field is also the same. The rules are based on the value in the dependency rule, which is numeric, being greater than, less than or equal to a number:

Example:

Rule 1: Field C results =0, Field A results = less than 10 then field B result =  Extensive

Rule 2: Field C results =0, Field A results = equal to or greater than 11 and less than or equal to  15 then field B result = Significant

Rule 3: Field C results =0, Field A results = equal to or greater than 16 and less than or equal to  20 then field B result = Minor

Rule 4: Field C results =0, Field A results = equal to or greater than 21 then field B result =  Standard

 

All rules are set to process subsequent rules. The first rule will fire, but the subsequent rules will not. Is there a way to combine all of these requirements into 1 rule?

Honored Contributor
Utkarsh_Mishra
Posts: 713
Registered: ‎07-13-2010
Message 2 of 3 (187 Views)

Re: Request Rules

[ Edited ]

Simply you can use Oracle Case.

 

In Rule Dependency Section -> Add Field A = 0 and C = Any Value

 

In Result Section -> Add field B

 

 

In SQL Section Add  (modify it according to your need... this is just example)

 

SELECT CASE
  WHEN [REQD.VP.C] < 10 THEN 'Extensive'
  WHEN [REQD.VP.C] >= 11 and [REQD.VP.C] <= 15 THEN 'Significant'
  WHEN [REQD.VP.C] >= 16 and [REQD.VP.C] <= 20 THEN 'Minor'
  ELSE 'Standard'
END,
CASE
  WHEN [REQD.VP.C] < 10 THEN 'Extensive'
  WHEN [REQD.VP.C] >= 11 and [REQD.VP.C] <= 15 THEN 'Significant'
  WHEN [REQD.VP.C] >= 16 and [REQD.VP.C] <= 20 THEN 'Minor'
  ELSE 'Standard'
END,
FROM dual;

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Occasional Contributor
Keli Hodnett
Posts: 6
Registered: ‎12-01-2010
Message 3 of 3 (178 Views)

Re: Request Rules

thanks!
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.